RE: RE: Hello World
You are viewing a single comment's thread from:

RE: Hello World

Words
79
Reading
1 min
9y

The version of Hello World you've shown is from the older pre-ISO version of C++, this is evident by the .h on the end of iostream and the lack of the std namespace.

The ISO version of Hello World in ISO C++ from the Hello World Collection site again is:

// Hello World in ISO C++

#include 

int main()
{
    std::cout << "Hello World!" << std::endl;
}

When I used to program in C++ we'd do the following to deal with the std namespace in a different way, but it may not be considered good practice:

// Hello World 

#include 
using namespace std;

int main()
{
    cout <<  "Hello World!" <<  endl;
}
@amos1969: The version of | Ecency