protected inheritance and abstract classesView more random threads:
- declared one varibale char s1[10] but when i am inputing...
- Sorting code in c++
- How can we stop a programme at any point in C++?
- A partial specialization may inherit from an ordinary class
- CS201 - Introduction to Programming important blanks for...
- Inverse Permutation Question in c++ 2011-12
- main() differences in c++ 2011
- this pointer in c++
- what is difference between Data Members and Members...
- What does it mean command line? in C++ 2012
Sponsored Links
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");
There are currently 1 users browsing this thread. (0 members and 1 guests)