...

/

Compiling C++ Code

Compiling C++ Code

Learn about the compilation process and the different types of compilers of C++.

For the computer to execute the Hello World code you have written, it first needs to be compiled by a C++ compiler. The compiler translates the textual representation of the program into a form that a computer can execute more efficiently.

What the compiler does

In very broad terms:

“The compiler is a translator that acts as an intermediary between the programmer and the CPU on the computer.”

A high-level language like C++ is actually a sort of ‘compromise’ language between the native language of the CPU (generally referred to as machine language) and the native language of the programmer (say English).

Computers do not natively understand human languages, yet for someone to write computer code in the native language of the machine would be too ...