int main()?

As we know

#include <iostream>
using namespace std;
int main()

{
cout << "Hello world\n";
return 0;
}

Question is what is the meaning & use of 3rd line of program I mean int main().
It is necessary to write or we can leave it?
Last edited on
chicofeo already explained main() in your other thread.
http://www.cplusplus.com/forum/beginner/175445/#msg867732

Every program MUST have a main function.

PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.
Last edited on
Topic archived. No new replies allowed.