|
Ambitious contributor
|
![]() |
| 27Sep2008,22:54 | #11 |
|
Thanks guys...
|
|
Newbie Member
|
|
| 10Oct2008,17:00 | #12 |
|
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. |
|
Go4Expert Founder
|
![]() |
| 11Oct2008,09:57 | #13 |
|
Quote:
Originally Posted by victor2008 |
|
Light Poster
|
|
| 17Oct2008,12:09 | #14 |
|
Go4Expert Founder
|
![]() |
| 17Oct2008,15:58 | #15 |
|
What do you want me to look there?
|
|
Newbie Member
|
|
| 14Nov2008,18:43 | #16 |
|
I don't completely understand the purpose of C++ I really need someone to teach me from scratch
|
|
Light Poster
|
|
| 4Dec2008,13:28 | #17 |
|
Its very good thing to explain how to work in a language.its very useful for newly learner languages.good going keep it up.
|
|
Contributor
|
|
| 9Dec2008,17:43 | #18 |
|
it is nice.
thanks for help. it is good for beginners like me. It is helps me. thanks once more |
|
Newbie Member
|
|
| 3Feb2009,16:47 | #19 |
|
Thanks for share us with a good example of c++.
|
|
Newbie Member
|
|
| 14Feb2009,22:51 | #20 |
|
good
|


