Monday, February 22, 2010

Programming in C++

C++ is one of the basic programming language which you can encounter in the programming world. It is an easy to learn and understand language. so let us start our Programming. But before you start your programming, you need to have a compiler. A compiler is a software which convert your Code into executable program. It is easily avaliable.
Lets start the coding..... This first Program will Print the words "Hello World" on your screen.
C++ has a basic syntax.
#include
void main(void)
{
cout<<"Hello World";
}



#include ( first line is your header file which you have to include into your code. this tells the compiler about the library files which you are going to use in your coding. iostream is for the input output stream.)
void main(void) (This line starts your main coding. void at the beginning means that you main function will not return any value and the one in brackets means that there are no arguments given to the function... arguments and return type will be discussed in later blogs.)
{
Your coding is written between these brackets.
cout<<"Hello World"; (cout followed by "<<" means that something is going to be printed on the screen. each statement ends with a semi-colon";")
}

This concludes your basic program...

Hope this helps you start Programming... This is my first blog so do reply and post something which can help me understand your level of programming and i can help you a lot in you work.

Thank You for your time ....
Legend Killer