![]() In this example, we only had one source file. The linker then generates an executable file, in this case program.exe. The software takes our source code and generates a machine language file which we will refer to as the object file. That file is fed into the compiler software. In this case it's called program.cpp where the extension. Here's a visual representation of what happens. To actually execute a C++ program, it first must be compiled. So, we use a compiler to accomplish that task. ![]() Now, it would be really difficult for us to program in machine language cause we'd have to figure out how to supply all the ones and zeros and that would just take a really, really long time. Each bit can either be on or off and is represented with a one or a zero. ![]() So, the machine language is just a series of what we call bits. Do you know what machine language looks like? If you said it's a series of ones and zeros, you're absolutely correct. A compiler is software that reads a source file and generates a new file containing all the instructions in machine language which can be understood by the computer. ![]() Before we start coding in C++, it's important that you understand how to compile and run C++ programs.
0 Comments
Leave a Reply. |