A program goes through the following steps from writing to finally getting the results of the run.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/07/wKiom1Tz_3qh44b4AABPc5fUnQs759.jpg "title=" 1.png " alt= "Wkiom1tz_3qh44b4aabpc5funqs759.jpg"/>
1. Write programs in C + + language
Programs written in high-level languages are called "source programs". The source program for C + + is suffixed with. CPP (CPP is the abbreviation for C Plus plus).
2. Compiling the source program
In order for a computer to execute a high-level language source program, it must first translate the source program into a binary form of "Object program " using a software called "Compiler (Complier)" (also known as a compiler or compilation system).
The compilation is compiled in the source program file as a separate unit. Target programs generally use . obj or . o as the suffix (an abbreviation for object). The role of compilation is to perform lexical and grammatical checks on the source program. All content in the file is checked at compile time, and all compilation error messages are displayed when the compilation is finished. There are two kinds of error messages in the general compiling system, one is error and the other is warning (warning).
3. Connect the target file
When all errors are corrected and all are compiled, one or more target files are obtained. At this point, the system-provided "connector (linker)" To all the target program of a program and the system's library files and other information provided by the system to connect together , and eventually form an executable binary file, its suffix is. exe, can be directly executed.
4. Running the program
Run the resulting executable binary (. exe file) and get the result.
This article is from the "Summer Wind" blog, please be sure to keep this source http://shahdza.blog.51cto.com/2410787/1616464
C + + Summary (2)--Program execution process