General C++ program has following structure.
INCLUDE HEADER FILES
DECLARE CLASS
DEFINE MEMBER FUNCTIONS
DEFINE MAIN FUNCTION
Description:-
1. Include header files In this section a programmer include all header files which are require to execute given program. The most important file is iostream.h header file. This file defines most of the C++ statements like cout and cin . Without this file one cannot load C++ program.
2. Declare Class In this section a programmer declares all classes which are necessary for given program. The programmer uses general syntax of creating class.
3. Define Member Functions This section allows programmer to design member functions of a class. The programmer can have inside declaration of a function or outside declaration of a function.
4. Define Main Functions This section the programmer creates object and call various functions writer within various class.