
-----------------------------------
Prince Pwn
Sun Dec 10, 2006 2:49 pm

New To C++
-----------------------------------
I'm trying out some C++. I downloaded Dev-C++ and I'm following a tutorial [url=http://www.cplusplus.com/doc/tutorial/program_structure.html]here but when I press F9 to compile and run my programs, it quickly opens a cmd window and I believe executes the code then closes the prompt window. Is there a way I can view my result from my code without it closing on me like that?

-----------------------------------
Tony
Sun Dec 10, 2006 3:14 pm


-----------------------------------
well as soon as your program finishes execution, there's nothing else for cmd to do, so it closes, just as it's supposed to.

You need to run your program through the cmd yourself: Start -> run -> cmd

then navigate to your program's location and open it from there.

It's probably best to compile through the command line as well.

-----------------------------------
Prince Pwn
Sun Dec 10, 2006 4:05 pm


-----------------------------------
Ah thanks. 

Is that the only way to do that though? I'm used to Turing, and I know you can do  "if Sys.Exec ("c:/windows/system32/cmd.exe") and Sys.Exec("C:/Documents and Settings/"+Sys.GetUserName+"/My Documents/C++/program.exe") then end if  