protected inheritance and abstract classesView more random threads:
- C++ Guessing Game include Number and ABC
- What is the difference among calloc function ,malloc...
- Why we write main rgc,char**argv in C++ 2012
- convert template to int in c++
- why we use pointers or reference except using real name of...
- something is wrong with this version of dev c++
- Linked list using arrays?
- I would able to program in c++ I would be able to program...
- security and privacy in c
- c++ code 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)