Need help with C++ - can't get compiler to work properly
I just recently started to try and learn C++, using the book "C++ without fear" by Brian Overland. However, even the simplest of programs just don't work. When I compile and run, the program just pops up for a tenth of a second and then it's gone. The only way I have found to resolve this, is to use cin.get(); before return 0;, however, as I got into more complex programs, I need more and more of those functions. Even for one of the ver early examples in the book, I need 2 of those right after each other, to get it to actually work like it should with none of those.
So I'm just wondering, there must be another way to get around this? The book mentions nothing of this, and I'm a bit annoyed I have to use all kinds of solutions with complex codes, when I'm just trying to follow a simple tutorial. I'm using Bloodshed Dev-C++ btw, if that makes any difference.
Thanks in advance
Sounds like you're making a command line program. So it pops up a console and then the console goes away when the program is done running. If you wan't to see the output run the program from a console. (run cmd.. navigate to dir where the program is.. run it from there)
Steve Verreault - Twilight Games
"Do you really think it is weakness that yields to temptation? I tell you that there are terrible temptations which it requires strength, strength and courage to yield to.” - Oscar Wilde