I'm a new programmer ! I want to run the hello world. after entering the codes in the bloc not I don't know how to save the file. i'm using windows operating system.
thank u for helping.
Ok what exactly is your question? I'm confused. Are you trying to write the "Hello World" program or are you trying to post the code in order for us to find an error?
that should have been file. but just right click that file, go to open with notepad, copy and paste it back into your compiler. Then save it with .cpp ..... No big deal.
well this is alot different than a lot of people would've done it but I don't think that this works.
The only reason that this doesn't work is because on the second line, you forgot the return type. which is usually type "int"
The typical "Hello world application is like this."
however if you are writting and C, make sure you include the pause statement to pause your output on screen when it runs.
That issue has nothing to do with C. It is what happens when you run a console program from inside an IDE. It's not a real issue - if you run a console program from something that isn't a console, it's what happens.
system("PAUSE");
This is bad. Firstly, you have to include <cstdlib>. If your compiler does that for you, it's not doing you any favours. Secondly, it's very expensive - http://www.gidnetwork.com/b-61.html . Thirdly, it will only work on a system where calling the OS shell is sensible AND that shell interprets the PAUSE command appropriately. It's very non-portable and it's dangerous. It surrenders your program to some other program entirely, which could be doing absolutely anything. There are many better ways to achieve the same goal.