General C++ program has following structure.
INCLUDE HEADER FILES
|
CLASS DECLARATION
|
MEMBER FUNCTIONS DEFINITIONS
|
MAIN FUNCTION PROGRAM
|
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. Class Declaration In this section a programmer declares all classes which are necessary for given program. The programmer uses general syntax of creating class.
3. Member Functions Definition 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. Main Function Program In this section programmer creates objects and calls various functions writer within various class.