Introduction to C++

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

This 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 . . .

Text from video

1
2
3
4
5
6
7
//Hello World
#include <iostream>
int main(void) {
  std::cout<<"Hello World\n";
  system("pause");
  return 0;
} //main
CODE

NEXT: Debugging: Finding errors