protected inheritance and abstract classesView more random threads:
- explain this operator -> which is use as...
- what is main logic behind turning a register into byte...
- Passing 2d array by reference June 2011
- what are instance variable in c++ ?
- importance of Object Oriented 2011
- How to call by reference ? I have an error.
- why we use pointers or reference except using real name of...
- what is the value of cardinality(*) in association in c++ ?
- floor conversion error in c++ 2011
- What is namespace std in c++ 2011?
Example
Code:class Parent{ int id; char * name; public: virtual void display()=0; }; class Derived:protected Parent { public: void display(){ cout<<"Derived class"<<endl; } }; int main(){ Derived obj; obj.display(); system("pause");
Sponsored Links
There are currently 1 users browsing this thread. (0 members and 1 guests)