The Compiler
Yes, but it can't run a C++ program. The only kind of program any computer can run is one made of machine instructions; this is called a machine language program, for obvious reasons. Therefore, to get our C++ program to run, we have to translate it into a machine language program. Don't worry, you won't have to do this yourself; that's why we have a program called a compiler.[4] The most basic tasks that the compiler performs are the following:
[4] How is the compiler itself translated into machine language so it can be executed? The most common method is to write the compiler in the same language it compiles and use the previous version of the compiler to compile the newest version! Of course, this looks like an infinite regress; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access