
Structure of a C++ Program 27
STEP 5: RUN THE PROGRAM
Unix/Linux platform:
Use command ./a.out to run the program.
Windows platform:
Use ‘Run’ option from Run menu of Turbo C++ IDE or use ctrl+F9 and see the output as per
program.
The following window shows execution of ABC.CPP program.
2.6 STRUCTURE OF A C++ PROGRAM
C++ programs consist of objects, classes, functions, variables,
and other statements. Figure 2.2 shows four different parts of
a C++ program.
(a) Preprocessor directives (Include header files section):
Preprocessing refers to the first step in compiling a
C++ file from a source language into machine lan-
guage. One of the most ...