C++ compilers & Structure of C++ Program

C++ compilers

  1. Turbo c++
  2. sone and c++
  3. Micros of + c++
  4. Dev c++
  5. C++ on Linux
  6. C++ on Unix
  7. C++ on Unix os
  8. C++ on solaries
  9. C++ on MAC

The latest version of c++ compiler is c++ on (++12)

 

Structure of C++ program :

it is divided into 5 sections

 

Document section
Linkage section
Global declaration
Main program section
Global data section

 

 

 

 

  1. Document section:

  • This section contain information about program on program heading
  • It is provided by using comments
  • c++ provide 2 types of comments

  1. single line(//)
  2. Multi line (/* *\)

Linkage section : C preprocessor directive section

It is a programming     (# include)

  • Any operation which has to be performed before compile program are defined this section

 

Global declaration :

It is used to declare global variable and function and types

Main program            

void main()

{

}                                 Main without arguments

 

void main(int arg c, char *arg[])    Main with arguments

{

}

 

Global definition :

Definition functions and types which are declared inside global declaration

void Main(int argc, char *arg v[], char *array)

{

}

  • Compiler works as translation program between high level languages to low level language.
  • Main is not recognized by compiler it is recognize by Linker 1