Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms


Getting Started


Intro
This lesson will take you through the complete steps of getting started in programming in C++. C++ is a programming language, that is it is a language like english, but which the computer understands. With this language we can make programs, like what you are using now "Windows" or "Internet Explorer" which was actually written in C++.
To start programming in C++, first we need a compiler. A compiler is a program which you type your C++ code into, a bit like notepad or word. Then when you have typed out your program, you can press a button to compile it, this will then check it for errors, if it is good, then it will create an executable file (*.exe) which is a file which can be clicked on and run.

Compiler
I personally am using a free compiler from the internet - Borland C++ 5.5 , this is an ok compiler, but not user friendly, thats why im making this lesson, to teach you how to get it, install it and run it. If you dont have a C++ compiler then you must download the compiler from the borland site, there are 2 files to download, the compiler and turbo debugger, please download both of these before proceeding if you do not have a C++ compiler. click here to download it

Installing
Now when you get it, click on the compiler file first, then the turbo debugger. Just follow the instructions by pressing ok for everything and please install it into the default directory - C:\borland\bcc55 else it can make life difficult. Then click on the turbo debugger, just install it as best you can into the same directory (folder), dont worry it it comes up with a complicated screen asking you to set colors and fonts etc, just quit if you get that. Hopefully it extracted and installed the compiler, all you needed to do was to click "ok" on everything.

Linking
Now we need to tell the compiler where to find include files. Ive made this part easy and ill just let you download the 3 files. You need bcc55.cfg - Click here , ilink32.cfg - Click here and bcc32.cfg - Click here. Once youve downloaded both of those, Put all 3 in the bin directory, ie: C:\Borland\Bcc55\Bin. To get there - click on my computer - C drive - borland - bcc55 - Bin , then cut and paste both of those files into that folder. If youve got this far good, cause youve now successfully installed it! if not, click home and email me.

The front end
Now, as i was saying this compiler is not user friendly, so i use a front end for it - miniIde, i think this is great because it is simple and you dont have worry about any command line stuff. If you are viewing this on my web page, not the offline stuff - Click here to get it. Now when you get it, place it in the same folder as the other 2 files you placed earlier - C:\Borland\Bcc55 , then click on it, it will prompt you to enter the directory of your compiler, if you used the default directory, then dont touch it and press ok. Then it should open with a help screen but weve already done it.

First program
Now were ready to make our first program. Open up notepad - Start - Programs - Accessories - Notepad. Copy and paste this into notepad:

#include<conio.h>
#include<iostream.h>

void main()
{
	cout << "Hello world!";
	getch();
}
Then click save as, locate the folder - C:\borland\bcc55 then give it a name ending with ".cpp" eg: Test.cpp , and on the 2nd row, click on all files instead of text documents, click ok. Now its time to compile our program.

Compiling
In the same folder you just saved it into, open up MiniIde.exe, the program you just downloaded duh. Then click the button at the top to open a file, click on the folder bcc55 then double click on your file, eg:Test.cpp it will come up on the compiler now. Now click compile at the top, wait, it should have no errors since i made it (I hope) , then click the button next to it, the arrow to run it. Exciting?

Home Next