You are viewing a single comment's thread from:

RE: Hello World

in #programming6 years ago

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 <iostream>

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 <iostream>
using namespace std;

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

Good spot, sir! I am still trying to get used to the editor... there seem to be a couple things that got erased when I removed blank lines. Also... C++ is not my language of choice in real life... otherwise things might have dawned on me earlier.

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 66565.59
ETH 3503.87
USDT 1.00
SBD 2.72