
Hello in C++
#include <iostream>
using namespace std;
// This is the C++ version of the hello, world program.
int main()
{
cout << "Hello, world!" << endl;
}
C++ changes:
- The using namespace std;.
- The // comment.
- The return 0; is assumed.
- The stream I/O facility.
- Include without .h (a relatively new direction in
the standard).
Reading: Ch. 3; p.38