And again...
#include <iostream>
using namespace std;
/*
* Just another way to do it.
*/
int main()
{
// Say it now.
cout << "Greetings, local planet!"
<< endl;
}
This version shows a few differences.
- The using namespace std; tells the compiler to copy all
the names from std directlly into the program. This means
we don't have to say std:: all the time.
- The parameters to main may be omitted.
- The return statement at the end of main may also be omitted.
The compiler assumes the function returns zero.
This is a special priviledge afforded main; any other
function with a return value should return something.