Starting OOP with CPP

Execution Structure 

cpp_flow_of_execution

Source code is written by the user forwarded to the compiler after that compiler does the processing on source code and generates Object Code. After that object code is linked with Libraries and it generates Executable file.

Executable_File

Programming Structure

First, we have to include Header file which contains C++function declarations and macro definitions to be shared between several source files which are helping the programmer to write efficient code.

Then we use a "namespace".It is a logical collection of variables and objects.

" cout " object represents the standard output. 

" cin " object represents the standard input.

"<<" is an insertion operator.

">>"  is an extraction operator.

 

Sample Structure of C++ Program

start_program