Thread: I want to write a simple program in C++ to...

  1. #1
    Registered User
    Join Date
    Mar 2003

    Question I want to write a simple program in C++ to...

    I want to write a simple program in C++ to open several other programs and files and then exit. I use several files and programs frequently for web development and would like to be able do double-click and icon and have them open up.


  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Ways to start other programs from a C/C++ program are discussed in the FAQ here.

    Tip, don't use the system() option.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Nov 2001
    There are several solutions. One solution is CeateProcess().


  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    As adrian says - goto the faq...

    But if you are opening documents and other files that are not exe files, but open inside exes, then use ShellExecute(Ex), as this function will look to the registry to see what program is registered to work with the file you want to open...example in the faq

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-30-2007, 10:08 AM
  2. need a simple program
    By Peter Griffin in forum C++ Programming
    Replies: 7
    Last Post: 12-04-2005, 04:23 PM
  3. Need help with simple, simple program.
    By LightsOut06 in forum C Programming
    Replies: 5
    Last Post: 09-01-2005, 08:31 PM
  4. Problem with simple XOR program
    By spike_ in forum C++ Programming
    Replies: 8
    Last Post: 08-17-2005, 12:09 AM
  5. simple frontend program problem
    By gandalf_bar in forum Linux Programming
    Replies: 16
    Last Post: 04-22-2004, 06:33 AM