Well, return 0; is sending a return value to the operating system. I guess for the purposes of a little status thingy it would work, but you can't return a value unless you have declared a function ( main() ). What endl; does, is signifies that you are finished with that aesthetic line of coding.
-----
for example
int main ()
{
cout<< "WHY IS THIS SO DIFFICULT HNNNNG";
cout << "PLEASE GOD TELL ME NOW";
You would think that those lines of text would show up on different vertical rows, but they don't. To get the effect of pressing enter, you would have to endl;
int main ()
{
cout<< "WHY IS THIS SO DIFFICULT HNNNNG" endl;
cout <<"PLEASE GOD TELL ME NOW";
}
return0;
Also I recommend you space things out a bit more. It cout<<"texthere"endl; might get kindof hard to read in the midst of a wall-o-code.
If you continue to learn and need help, check out #C++. They always have a few people in there, like Blam, who really know what they're doing.
May I ask what compiler you are using?
Last edited by jxc1013; Jan 24, 2011 at 12:33 PM.
Reason: <24 hour edit/bump