Learn programming

Writing c ++ program


The source code of c ++ program is stored on the disk with " cpp " extension (cpp stand c plus plus). The program is stored in a text file on the disk. Any text editor can be used to write and edit C++ source code.

The C++ compiler translates a C++ program into the machine code. the machine code is called object code which is stored in a new file with the ".obj" extension.

The object code is then linked to the libraries. After linking the object code to the libraries, an executable file with extension ".exe" is created. The executable program is then run from operating system command line. 

For example a source code of program in C++ is written and stored in file First.cpp, After compilation the object code is saved in file First.obj and executable code is stored in file First .exe.


Written by: | Learn C plus plus | - @Maisam Afshar
Previous
Next Post »