OOPortal
RationalDB Database Design
prev next prev next
  Course navigation
 
Lesson 4
Objective
Similarities in C and C++ program structure
Examine similarities between C/C++ program structure.
   
As you have seen in the last several lessons, the organization of a C++ program is very similar to the organization of a C program.
  1. C++ relies on an external standard library to provide input/output. The information the program needs to use this library resides in the library file iostream.h.
  2. C++ uses a preprocessor to handle a set of directives, such as the include directive, to convert the program from its preprocessing form to pure C++ syntax. These directives are introduced by the symbol #.
  3. The function main() is used as the starting point for execution of the program. It obeys the C++ rules for function declaration. The function main() implicitly returns zero, indicating normal termination. Other return values would indicate an error condition.
  Course navigation