The point is that the program probably closes before you get to see anything. Console programs are intended to be ran from console. cin.get() is a bit of a hack.
Although I remember code blocks doing the pause on its own..
I believe it is a Code::Blocks message, but I could be wrong. In any case, it is something your IDE or shell is doing.
Personally, I always test command-line programs from the command-line. If part of your issue is that you like the "Press any key to continue" before the pop-up command prompt disappears, see http://cplusplus.com/articles/iw6AC542/
It only shows that message if you run the program directly from code::blocks. If you run the program by opening the .exe file from wherever it's saved then you won't get this message. Although, you won't see "Hello World!" printed on the screen because you haven't put in any code to keep the console window open.
@iHutch105
That will not fix his issue, it only adds to it. Also:
@Jlm07
That really is not a good thing to put in console programs. While I have written an Article about this ( http://www.cplusplus.com/articles/iw6AC542/ ), keep in mind that console applications are very much restricted when you do things like that.
Again, all you are seeing is something your IDE is doing for your benefit. If you want to see how your program will actually run from the console, go to Start, click the Run edit box, type in "cmd" (without the quotes), and press ENTER. Once there, you can set the drive and directory to where your program's executable is, and then run it by typing its name.