How do you write a C Plus Plus 'Hello World' program?

Answer:

C++ Hello World Example:

// this is a single line comment
/*	this
	is
	a
	multi-line comment */

#include       // header file needed to print
using namespace std;     // instead of having to write std::cout

// the main function is where the program begins execution
int main()
{
	// print Hello world. and a new line
	cout << "Hello world." << endl;

	// end the program
	return 0;
}
First answer by Flaun. Last edit by Flaun. Contributor trust: 24 [recommend contributor recommended]. Question popularity: 2 [recommend question].