|
| |||||||||||||||||||||||||||||||||
| GBStudio (6) | |||
|
Hi I'm new to C++, and I was following the tutorials on this website. I'm using visual studio 2008 and when I run the program it terminates just when it starts. Here is the code:
This is the process I follow: I make a .cpp file containing the code above, and then in VS I choose File\New\Project From Existing Code Then I choose C++ as the project type, I browse the folder containing the .cpp file as the project file location. Then I choose console application project. Afte that I run the program, and a cmd window appears containing the Hello World! text and then the program ends instansly. I wonder, is the code supposed to act in this way? Or do I do something wrong in Visual Studio? Thanks for your time :) Kindest Regards GBStudio | |||
|
Last edited on
|
|||
| tomao (31) | |
Right before you have 'return 0;' put:system("PAUSE"); | |
|
|
|
| GBStudio (6) | |
|
Thanks a lot :) Kindest Regards GBStudio | |
|
|
|