Thursday 28 March 2013

Programming In C++...

Hi there once again.

First of all, let me apologize for being out of action for a while. I really had some problems managing all my works. I believe it won't happen again.

So lets move on to programming in C++.

Before I introduce the most basics of C++ programs, let me talk you through one more matter.

We all know that computers are only capable of understanding machine level language or Binary form as it is called. We also know that C++ is a Fourth generation language. This makes it necessary for a mediator or translator to convert the Fourth generation (High level) language to basic or machine level language. This converter is called compiler.
So when you downloaded the C++ compiler, you downloaded a set of several other programs. These programs are mentioned below with their use :


  • Editor      - The Editor is used to write the C++ program. Hence it acts as a platform for you to type                        your C++ program. This program is termed as the Source code.
  • Compiler - The Compiler, as mentioned before, is used to convert the high level language (in this case C++) to machine level language.
  • Linker     - The Linker is used to link the header files required with the main program before the execution of the program.(We will go through the concept of header files shortly!!)
  • Loader    - The Loader is used,as the name suggests, to load the program to the computer memory for its execution.
Thats it!! I know that some of you might be a bit frustrated at the basics and can't wait to get to programming!! So here we go/....

Here is a sample program for you to start with. This is the most basic of all programs in C++:
I am mentioning line numbers in the extreme right corner.

0. //Sample program
1. #include<iostream.h>
2. #include<conio.h>
3. void main()
4. {
5. clrscr();
6. cout<<"Welcome to C++ programming!!!";
7. getch();
8. }


I suggest you spend a good minute or two reading through the program given above and then proceeding.

So in the next blog, We will go through each statement in detail.
See you then!!
Don't forget to subscribe or add yourself as a member to the blog.
Cheerio!!

No comments:

Post a Comment