How do you open a file (.exe file) with C++

May 14, 2012 at 5:09am
I already looked into cstdio and fstream libraries, but wasn't able to pull it off.
May 14, 2012 at 5:28am
To open the .exe file, the program needs to be compiled. Click on "Compile" in your compiler system. It should give you back a list of errors, if any. If there are no errors, you should be able to click "Run" on your compiler system to open the .exe file. On mine, there is a "Compile & Run" button, for those who are sure that there are no errors. If there are any errors, the system should give you back the reasons for the errors. These errors are, usually, quite easy to follow. Try that.
May 14, 2012 at 5:56am
I guess I didn't explain well. I meant how to open a file other than the actual program you made. For example, I made a C++ program that compiled and everytime i run it, it would open Internet explorer (which is .exe file)
May 14, 2012 at 6:21am
You'd probably want to use system() for that, or go read up on the API of whatever OS you are running your program on.
May 14, 2012 at 9:31am
"Open" and "Execute" are totally different things.
May 14, 2012 at 10:00am
Basically he wants to make a program which opens Internet Explorer.exe, for him.
Last edited on May 14, 2012 at 10:01am
Topic archived. No new replies allowed.