Title: Visual C++ Console Program Structure
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

A Visual C++ program has the following structure:

Comments:

- Begin with //
- May be placed on their own line, or at the end of a line

A Visual C++ program includes or header files (.h) bring code in from other places:
#include <fstream> is needed to read and write files.
#include <iomanip> is needed for formatting output.
#include <iostream> is needed for reading from (cin) and writing to the console (cout).
#include <stdlib.h> is needed to call system("pause");
#include <string> is needed to use string variables.

Using namespace enables us to abbreviate function calls:
using namespace std; enables us to code cout, rather than std::cout.

Main routine:
int main() { } is the body of our program.