Lightbulb[C++] Tutorial 1: Baby Steps

Posts 1–15 of 18 · Page 1 of 2
[C++] Tutorial 1: Baby Steps
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-
was this made by you? and why did you post in 3 topics if you could have posted in the same one. Also, i don't really agree with CodeBlocks.. people should start with VS in my opinion (not everyone's opinion).
Quote Originally Posted by 'Bruno View Post
was this made by you? and why did you post in 3 topics if you could have posted in the same one. Also, i don't really agree with CodeBlocks.. people should start with VS in my opinion (not everyone's opinion).
Yes it was made by me, when I used to be a VIP Coder at Game.Killer.NET. Code::Blocks is simple, and doesn't microsoft-ize the content that goes through it, which is more than enough reason to use it instead of VS++ for beginners.

All three threads are very long. They cover different areas. It's easier to split them.

Regards,
-Schyler-
Quote Originally Posted by Schyler View Post
Yes it was made by me, when I used to be a VIP Coder at Game.Killer.NET. Code::Blocks is simple, and doesn't microsoft-ize the content that goes through it, which is more than enough reason to use it instead of VS++ for beginners.

All three threads are very long. They cover different areas. It's easier to split them.

Regards,
-Schyler-
Visual Studio will be better for future use.. and if you get used to it.. you will easily use any compiler :\ anyway.. ok..

edit: forgot, gj on tut btw.
Quote Originally Posted by 'Bruno View Post
Visual Studio will be better for future use.. and if you get used to it.. you will easily use any compiler :\ anyway.. ok..

edit: forgot, gj on tut btw.
Thanks. (:
Quote Originally Posted by Schyler View Post
Yes it was made by me, when I used to be a VIP Coder at Game.Killer.NET. Code::Blocks is simple, and doesn't microsoft-ize the content that goes through it, which is more than enough reason to use it instead of VS++ for beginners.

All three threads are very long. They cover different areas. It's easier to split them.

Regards,
-Schyler-
Must've been shitty hacks then if you used Code::Blocks.
Hmm, I'm not quite sure it was made by you. Here:[C++]Tutorial 1:Baby Steps

Same exact thing, even the thread name.

EDIT: Damn, my bad. It's yours. He gave you credits in his thread. Nice job on the tutorial, although I never used code blocks. I started from Dev.
Quote Originally Posted by Void View Post
Hmm, I'm not quite sure it was made by you. Here:[C++]Tutorial 1:Baby Steps

Same exact thing, even the thread name.

EDIT: Damn, my bad. It's yours. He gave you credits in his thread. Nice job on the tutorial, although I never used code blocks. I started from Dev.
yeap i juse saw the same thing (credits to him).
Quote Originally Posted by 'Bruno View Post
yeap i juse saw the same thing (credits to him).
It's also on DarkZtar, for those who care.

Regards,
-Schyler-
Hmmm.... Nice introduction to Code::Blocks and welcome to MPGH.

HD play nice now. If your good enough you can compile a C++ program with nothing but notepad and a command line compiler like cl.exe :P
Quote Originally Posted by why06 View Post
Hmmm.... Nice introduction to Code::Blocks and welcome to MPGH.

HD play nice now. If your good enough you can compile a C++ program with nothing but notepad and a command line compiler like cl.exe :P
I am playing nice, I just don't see how any 'professional' game hacking site could allow you to work with Code::Blocks since most of the SDK's used fuck up very badly on crap other then MSVC++
Quote Originally Posted by Retoxified View Post
I am playing nice, I just don't see how any 'professional' game hacking site could allow you to work with Code::Blocks since most of the SDK's used fuck up very badly.
Fixed it for you.

Nah, but I understand where your coming from. There's been a lot of "VIP Hackers" that couldn't write Hello World so I usually take it with a grain of salt.

PS: And perhaps a bit of pepper and occasionally a side of ketchup.
Quote Originally Posted by Retoxified View Post
I am playing nice, I just don't see how any 'professional' game hacking site could allow you to work with Code::Blocks since most of the SDK's used fuck up very badly on crap other then MSVC++
Then these "SDK"-'s, if you can call them that, were programmed extremely poorly.
When you're eating plain fries like I am and people start talking about salt, pepper, and ketchup, you wish you would have been lazy enough to eat at the Burger King instead of walk home and eat it then.
Quote Originally Posted by KABLE View Post
When you're eating plain fries like I am and people start talking about salt, pepper, and ketchup, you wish you would have been lazy enough to eat at the Burger King instead of walk home and eat it then.
Do you have a point?
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us