C++ Beginner
Hi there guys, i just started c++ today, i got a book on it. I followed everything the book told me to do, i can compile it, and it opens up and shows my stuff in the visual c++ thing, but if i try to compile it as a release, and open the exe file it shutdowns right away and i cant see it. Will i learn something later on that will make it so it doesnt shut down when i open it? Or am i doing something wrong. If you need any info, ask me.
0
Comments
type cmd
this brings up the command prompt (excuse me if you already know all of this)
navigate to the executable using cd (change directory)
try running it by typing in the name.
basically it looks fine, but when you run it, windows closes the output window before you can see that it's working. using the command prompt allows you to see the output.
If you want you can put 'system("pause");' after the cout and it will wait for a key to be entered. I use that quite often in my labs so my teacher and look at my output.
This is assuming you are using .net visual C++
Good Luck