protected inheritance and abstract classesView more random threads:
- what is difference between object data type and Permitive...
- How to install Dev c++
- check for empty vector in c++ 2011
- Constants in C Language 2011-12
- where we use scoope resulation operation in c++?
- What data type will be used in C++ program?
- Explain the difference between state and attribute in c++...
- Networking in c++ 2011
- what is difference between Data Members and Members...
- question adout 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)