C++ one more time (continuous extension)

Write in front:

The following refers to Teacher Qian Neng's "C++ Programming Tutorial Second Edition".

An overview (Introduction)

To learn programming, we must first understand the process of program development, otherwise, the improvement of programming skills cannot be verified by successful operation.

Once written in a programming language, it needs to be translated into machine code so that the computer can run and get results.

 

There are generally two ways of translation:

One is the interpretation type, that is, the program is translated while reading the program, and it is executed after it is translated into machine code.

The other is the compiled type, that is, the entire article is first translated into machine code, stored in an executable program file, and then the program file is started, and the result is obtained by running it.

C++ language programs are compiled because of their high performance.

 

The general programming operation flow is: edit (edit)---compile (compile)---link (link/make/build)---debug (debug).

 

The following passage is believed to have been ignored by many people at the beginning ^_^:

Programs edited by programmers, also known as source programs, or source code, or code for short, are stored in textual files with .cpp (in Windows environment) as the file extension.

In rare cases, machine instruction set code is also called source code. After the program is compiled (compile), the object code (object code) will be generated and stored in the object file. The C++ compiler in Windows usually uses the .obj file extension for the object file.

Object code, or machine code, is a set of instructions that a computer can recognize. However, the target instruction (also called the target code) cannot be run on a specific computer, because the target code is just an independent program segment, and the program segments have not yet echoed each other. The C++ library code used in the program segment and other The resources have not been linked yet, and they need to be connected to each other to form a whole executable program that adapts to a certain operating system environment. In order to convert a grouped program segment into an executable program, it must be linked . The process of linking is to integrate (or convert) the object code into an executable file. The executable file usually has an .exe file extension.

 

After a C++ program is compiled, an executable program is created by linking several object files and several library files at the same time. Library files are program link resources provided by the system. Standard C++ provides the C++ standard library, and the user library is provided by software developers or programmers. The result of linking the object file and the library file is to generate a computer-executable program.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324936401&siteId=291194637