opening a file

Discussion in 'C Programming' started by nikhil, Jul 23, 2007.

  1. nikhil

    nikhil Guest

    Hello every one,

    Can any one tell me the syntax for opening and closing a file in
    associated program from C++.
    For an instance I got a MS word file. How can I open it in MS word
    from a console program in C++. and also how can I close any
    application from the console program ( like closing MS word opened in
    previous step).

    I'm using Visual Studio 2005.

    thanks
     
    nikhil, Jul 23, 2007
    #1
    1. Advertising

  2. nikhil

    santosh Guest

    nikhil wrote:

    > Hello every one,
    >
    > Can any one tell me the syntax for opening and closing a file in
    > associated program from C++.


    [ ... ]

    What makes you think a C++ question is topical in a C group?

    Post to news:comp.lang.c++
     
    santosh, Jul 23, 2007
    #2
    1. Advertising

  3. santosh wrote:
    >
    > nikhil wrote:
    >
    > > Hello every one,
    > >
    > > Can any one tell me the syntax for opening and closing a file in
    > > associated program from C++.

    >
    > [ ... ]
    >
    > What makes you think a C++ question is topical in a C group?
    >
    > Post to news:comp.lang.c++


    Given that he doesn't want to open the file in his program, but rather
    how to get the "associated program" (ie: MS-Word in his case) to open
    and close it, I doubt that clc++ is the right place, either. This is
    clear by the unquoted part of the OP:

    > For an instance I got a MS word file. How can I open it in MS word
    > from a console program in C++. and also how can I close any
    > application from the console program ( like closing MS word opened in
    > previous step).


    The right place would be one of the Windows-specific groups, but I
    don't know which one.

    --
    +-------------------------+--------------------+-----------------------+
    | Kenneth J. Brody | www.hvcomputer.com | #include |
    | kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
    +-------------------------+--------------------+-----------------------+
    Don't e-mail me at: <mailto:>
     
    Kenneth Brody, Jul 23, 2007
    #3
  4. nikhil

    Default User Guest

    santosh wrote:

    > nikhil wrote:
    >
    > > Hello every one,
    > >
    > > Can any one tell me the syntax for opening and closing a file in
    > > associated program from C++.

    >
    > [ ... ]
    >
    > What makes you think a C++ question is topical in a C group?
    >
    > Post to news:comp.lang.c++



    Geez. Don't send him to clc++ with all that non-standard crap.




    Brian
     
    Default User, Jul 23, 2007
    #4
  5. nikhil

    user923005 Guest

    On Jul 23, 12:12 pm, nikhil <> wrote:
    > Hello every one,
    >
    > Can any one tell me the syntax for opening and closing a file in
    > associated program from C++.
    > For an instance I got a MS word file. How can I open it in MS word
    > from a console program in C++. and also how can I close any
    > application from the console program ( like closing MS word opened in
    > previous step).
    >
    > I'm using Visual Studio 2005.


    Your answer is somewhere in the news:microsoft.public.* area.
    Your question is about OLE Automation.
    Happy hunting.
     
    user923005, Jul 23, 2007
    #5
  6. nikhil

    nikhil Guest

    On Jul 23, 3:32 pm, user923005 <> wrote:
    > On Jul 23, 12:12 pm, nikhil <> wrote:
    >
    > > Hello every one,

    >
    > > Can any one tell me the syntax for opening and closing a file in
    > > associated program from C++.
    > > For an instance I got a MS word file. How can I open it in MS word
    > > from a console program in C++. and also how can I close any
    > > application from the console program ( like closing MS word opened in
    > > previous step).

    >
    > > I'm using Visual Studio 2005.

    >
    > Your answer is somewhere in the news:microsoft.public.* area.
    > Your question is about OLE Automation.
    > Happy hunting.


    thanks guys for helping me out,
    by the way I posted this question here,as my question was for both C/C+
    +, I'm sorry I forgot to mention c above.
     
    nikhil, Jul 23, 2007
    #6
  7. nikhil

    Ben Pfaff Guest

    Michael B Allen <> writes:

    > On Mon, 23 Jul 2007 14:01:18 -0700
    > Ben Pfaff <> wrote:
    >> POSIX is standardizing an extended set of locale functions with
    >> what you call "context objects". It appears to me to be
    >> implementable as a set of wrappers around the existing functions
    >> for systems that don't support it, so this may actually be a
    >> viable interface fairly soon. (For folks who are familiar with
    >> gnulib--which is not c.l.c compliant code by any means--I'm
    >> thinking about adding a module to support these new functions.)

    >
    > Glad to hear it. Can you have pointers to info about what the API will
    > look like?


    http://www.opengroup.org/pubs/catalog/c065.htm
    --
    Ben Pfaff
    http://benpfaff.org
     
    Ben Pfaff, Jul 23, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ben
    Replies:
    10
    Views:
    4,994
    Old Wolf
    Feb 25, 2004
  2. Replies:
    7
    Views:
    513
  3. amacch95

    opening media file in asp file

    amacch95, Apr 17, 2008, in forum: .NET
    Replies:
    0
    Views:
    344
    amacch95
    Apr 17, 2008
  4. fniles
    Replies:
    0
    Views:
    282
    fniles
    Apr 26, 2009
  5. John Smith
    Replies:
    2
    Views:
    297
    Brian McCauley
    Dec 1, 2003
Loading...

Share This Page