previous | start | next

Compiling a Simple Program (Syntax)

Syntax 1.1 : Simple Program

header files
using namespace std;
int main()
{
   statements
   return 0;
}

Example:
#include <iostream>
using namespace std;
int main()
{
   cout << "Hello, World!\n";
   return 0;
}
Purpose: A simple program, with all program instructions in a main function.

 



previous | start | next