Just take out the void. So it should look like this.
Code:
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!\n";
return 0;
}
The \n is optional as that only makes a new line. If you want you can declare main as void by doing void main() and put cin.get(). It has the same effect as a return 0. _________________
8D wrote:
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
If you want you can declare main as void by doing void main() and put cin.get(). It has the same effect as a return 0.
You couldn't be more wrong. cin.get reads a character from keyboard input; return 0 exits the function and returns a 0 to the caller. The 0 in this case symbolizes that everything went fine.
Completely different. _________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for?
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum