protected inheritance and abstract classesView more random threads:
- Overloaded >> operator not reading more than first line...
- What is difference among Binary Tree, Complete Binary Tree...
- What is the difference between “object = this->object” and...
- sir (c)and c++ languages are low level language or high...
- Initilization of Data Member in c++ 2011
- c++ program on unix
- Networking in c++ 2011
- why we use queues data structure for level order traverse?
- what is difference between a constructor and over loaded...
- offline function in C++
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)