VC++ tutorial

Visual C++ Examples

How To Add Menu In VC++

OOps Concept In VC++
Previous Home Next


The ability to use already created classes is one of the strengths of C++. If you have a ready made class, you can construct a new one using the existing characteristics. Inheritance is the ability to create an object using, or based on, another. The new or inherited object is also said to derive from the other class. There are various ways you can inherit a class: using an operating system object, basing an object on an existing C++ class, or creating a class from a Microsoft


Polymorphism in VC++ is the same as polymorphism in C++ itself. When you implicitly call a virtual method of a base class or one of its derivatives, then you rightly expect the most-derived override to execute instead, even when the runtime type is completely unknown to the caller and cannot be determined at runtime let alone compile time.

You get that for free simply by overriding the known virtual methods of the base class, and without any need for expensive runtime type information, which is only useful if the caller is actually aware of the type in the first place, and which can only be predicted on a closed system. The whole point of polymorphism is that the base class (and therefore the caller) need know nothing whatsoever about any of its derivatives in order to execute more specialized methods. VC++ fully supports this aspect of OOP.


basically means hiding the parts of an objects that do thing The process of bringing together the data and method of an object is called as encapsulation. The data and method are given in the class definition. Classes provides us with this feature - Encapsulation. Encapsualtion basically means hinding the parts of an object that do things internally from other objects that interact with it. Encapsulation is generally used to simplify the model that other objects have to intrect with. it allows other objects to only be concerned with using the right interface and passing the correct input to get the required response.

Previous Home Next