Before we can do any coding, we must first understand how a computer program is developed.
Here is a graphic outlining the general approach:
What do you want to do? Do you want to make a game or do you want to control a robot? This step is the most important. You must have a well defined idea before going to the next step.
Here, you need to think about how to solve your problem. In other words, you plan before you code. Its very common to have a programmer that has an awesome idea, begins writting a program, and gets lost somewhere in the middle. We all have been through there. Remember the KISS thing that I talked about earlier? This is the place to apply your KISS knowledge!
A good solution will be:
If step 2 is done correctly, this will be easy. If you jumped straight in from Step 1 to this step, you may end up with this:
Compilation refers to the process of transforming your code into binary files known as object files. This process can be tought of as "tranlating" C++ code into machine code.
The simplified process of compiling is:
Here's a graphic for you to enjoy:
In complex projects, its very common to find a Makefile, which is a set of rules that tells your system how to compile your project. But thats a different topic...
Basically, these files are ready to be executed, but there is still one more step:
This process refers to taking all the object files and putting them into a executable. The resulting file is what we know as computer programs.
The basic process of the linker is:
Here is a nice graphic explaining this process:
This can be the most fun part or the most frustrating part. Here, you will run your program so many times that you will get sick of it. This is one of the most important steps in software development, because it allows you to ensure that your program is bug-free and will behave as expected. Think of it as "polishing" your program.
"Introduction to Development." Learn C++. N.p., 28 May 2007. Web. 16 May 2015. http://www.learncpp.com/cpp-tutorial/04-introduction-to-development.