Executing another program from a program

Hi. I'm a beginner at C++ programming and I'm working on a project. I want to execute another program(e.g.program2.exe) in a new window from a program(e.g.program1.exe). I 've read through some older posts and follow the solutions but the most I can do is open program2 within program1. Can someone kind help me?
Last edited on
You could use system commands to open it like:

 
system("start program2.exe");


but the only problem with that is that its not portable; this ^^ can only be used on windows.
It works perfectly. Thanks! =)
Topic archived. No new replies allowed.