This tutorial is what you would typically view if you are starting out with programming C++ for the very first time. We will cover a few of the following aspects:
- Setting up your computer as a development environment
- Setting up your compilers
- Making sure that you are ready for Tutorial 2
Part I: Explanation of the C++ Engine
C++ is one of the most powerful languages out there. It can calculate massive amounts of iterations and perform many external calls in a very short period of time. To create a C++ application, there are two processes involved:
- Creating the application in some form of IDE (eg: Code::Blocks)
- Feeding the IDE developed files to a mainstream compiler (eg: MingW)
IDE stands for Integrated Development Environment. It is a program which allows you to edit your code files quickly and produce much faster than what was previously used a few years ago, or what the MSDOS/Win3.1/Windows 95 team would have used.
A compiler is something entirely different. It's main task is to turn files into executable bytecode (1's and 0's), so that the computer can read them. There are two variants of a compiler:
- A byte compiler; Compiles to bytecode read from the computer
- A opcode compiler; Compiles to opcodes (usually 32 bits long) which tell an Interpreter execution instructions.
Part II: Gathering the things we need
Before we go too much into detail on specifics, I figured it would be much easier to understand with the IDE in front of you. To follow these tutorials you will need to download the following programs and install
FULLY into the default directories (don't change installation area).
Code::Blocks and MingW Package
Description: IDE, with MingW pre-installed
Download Link:
Click Here
Once you have downloaded the package, open the binary installer. The file should look like this:
Once opened, you will be presented with this screen shortly after the contents are unpacked:
Just press next until you get this screen:
At this point, read the terms and conditions then press the button which says "I Agree". The next screen looks like this:
You will have to drop down the box and select "Full Install" so that you get everything you need. Now, just click onwards and you will have the next screen. This asks you for the installation directory. Just leave it as default;
If you click Install you will get this screen. Wait for it to pass.
After you see this dialog, press No. If you pressed Yes, close Code::Blocks. Restart your computer.
Once you have restarted your computer, browse the start menu until you find the Code::Blocks shortcut. From here, run the link which has been highlighted as so.
When opened, it should look like this. Several dialogs will appear to do with the linking and compiler settings, but just press Okay making sure that your highlight whatever defaults are presented. These usually vary between computers.
Now, if it's all working correctly and Code::Blocks will run, continue with the tutorial, otherwise you should uninstall Code::Blocks, re-download the package and start again.
Part III: A brief tour of Code::Blocks
Throughout the course of this tutorial it is a likely that you will need to change the Code::Blocks settings. They are located in the Settings menu as shown. There are several types of settings;
Once clicked on "Editor", the user is presented with the following window. It is recommended you don't change anything, but rather just understand what each part does.
If you close that window, return to the default Code::Blocks screen. To save changes press "Ok" otherwise press "Cancel". You will be introduced to actual coding in the next chapter.
Part IV: Other Compilers
There are other compilers also available however, while they may have more features, the code is more complex for the simple tasks in these tutorials. It is quite rare for all compilers to share a standard code form. For those who want adventure, I recommend the following ones:
- Bloodshed Dev-C++
- Visual Studio Express Edition (C++)
- Eclipse Classic Edition
A quick Google search can result in
millions of results for you to choose from.
That concludes this tutorial. You are now ready for the second tutorial if you wish to go forward. In the next tutorial we will cover some of the following points;
- Coding Syntax
- Create your first application
- Using basic IO Console functions
- Building, Running and uploading
I hope that you look forward for the next addition. Please post all comments, suggestions and questions in this topic. Any other things can be asked via PM (Personal Messenger Service).
Regards,
-Schyler-