Expert C++
上QQ阅读APP看书,第一时间看更新

Program execution

In Chapter 1, Building C++ Applications, we learned that the compiler generates an executable file after compiling the source code. The executable file contains machine code that can be copied to the memory of the computer to be run by the Central Processing Unit (CPU). The copying is done by an internal tool of the OS called a loader. So the operating system (OS) copies the contents of the program to the memory and starts executing the program by passing its first instruction to the CPU.