Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++

Name: Anonymous 2008-02-02 12:11

Hi /prog/

return 0; or not? \n or endl?

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World!" << endl;
    return 0;
}

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World!\n";
}

Name: Anonymous 2008-02-04 8:51

>>11
I <3 C.

You don't have to return anything, because when the program ends whatever was in %eax doesn't matter...unless you are running the program from the command line and want to know under what conditions it ended. ie. Whether it returned -1 or 0. That way you would know if your copy file or whatever bullshit program you wrote succeeded or failed.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List