Sunday, March 28, 2010

C++ for beginners

Hi There,
Here we are going to learn something about c++. It is only for the begineers. Well, we will promote it upto advanced level as we move through our lessons. C++ programming is being used worldwide to develop many softwares and games to visit our will.

A very short history of c++:
C++ is acronym for c plus plus. It is an object oriented programming language. It is a successor c language. The c++ language was developed by Bjarna Stroustroup in Bell laboratories. During these days it was called "c with classes". But a friend of him suggested him to change it to c++ as the unary operator ++ in c. Later it was granted iso standard and has been developed now as the world's most popular languages for programming purposes.

starting our c-language course:
Here we will deal only with tutorials or examples:
1. Simply print a string in c++:
// main.cpp
// print hello world
#include
#include
using namespace std;
int main()
{
cout<<"\nHello world";
system("pause");
return 0;
}
2. To print the sum between two numbers:
//main.cpp
// sum between two numbers
#include
using namespace std;
int main()
{
int a, b;
cout<<"Enter the two numbers"<cin>>a,b;
cout<cout<<"The sum of the two numbers is"<

system("pause");
return 0;
}
output:
Enter two numbers 19, 20
The sum of the two numbers is 39