Introduction to C++

Traditionally, the first program you write is to display the words "Hello World".

This is the simplest program you can write: no variables, no input, no calculations, etc.

The hard part is to find a compiler, install it, figure out how to start the program, and how to run it.

1
2
3
4
5
6
7
8
//Hello World
#include <iostream>
using namespace std;
int main(void) {
  cout<<"Hello World\n";
  system("pause");
  return 0;
} //main
CODE
Hello World
Press any key to continue . . .

Videos

Windows: Writing the Hello-World program using Visual Studio

Mac: Writing the Hello-World program using XCode

NEXT: Explanation of the hello world program