0
GreenGrass's Avatar, Join Date: Jul 2008
Ambitious contributor
Thanks guys...
0
victor2008's Avatar, Join Date: Oct 2008
Newbie Member
C++ is an object-oriented version of C that has been widely used to develop enterprise and commercial applications. C++ became popular because it combined traditional C programming with object-oriented programming features. Smalltalk and other OOP languages did not provide the familiar structures of conventional languages such as C and Pascal. Microsoft's Visual C++ is the most widely used C++ language.

An example:

Code:
#include <iostream>
 
class Bird                 // the "generic" base class
{
public:
  virtual void OutputName() {std::cout << "a bird";}
  virtual ~Bird() {}
};
 
class Swan : public Bird   // Swan derives from Bird
{ 
public:
  void OutputName() {std::cout << "a swan";} // overrides virtual function
};
 
int main()
{
  Swan mySwan;             // Creates a swan.
 
  Bird* myBird = &mySwan;  // Declares a pointer to a generic Bird,
                           // and sets it pointing to a newly created Swan.
 
  myBird->OutputName();    // This will output "a swan", not "a bird".
 
  return 0;
}

Last edited by shabbir; 11Oct2008 at 09:54.. Reason: Confine links to signatures only.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by victor2008
C++ is an object-oriented version of C
The biggest misconception of the century I guess. C++ is totally different from C semantically but supports the syntax of C
0
damoonica's Avatar, Join Date: Oct 2008
Light Poster
did you see that Tutorial
Object Oriented Programming c++
Object Oriented Programming C++
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
What do you want me to look there?
0
puma_runner's Avatar, Join Date: Nov 2008
Newbie Member
I don't completely understand the purpose of C++ I really need someone to teach me from scratch
0
ruby20's Avatar
Light Poster
Its very good thing to explain how to work in a language.its very useful for newly learner languages.good going keep it up.
0
skp819's Avatar
Contributor
it is nice.
thanks for help.
it is good for beginners like me. It is helps me.
thanks once more
0
Stenna's Avatar, Join Date: Feb 2009
Newbie Member
Thanks for share us with a good example of c++.
0
new_en_it's Avatar, Join Date: Nov 2008
Newbie Member
good