protected inheritance and abstract classesView more random threads:
- Better way to erase elements from a std::list? in c++ 2011
- what this function do ? void student ::setName (char...
- object oriented programming what does it mean and what are...
- explain cardinality in c++ 2011
- static member function can be declared explicitly?
- GetPixel problem in c++ 2011-12
- convert template to int in c++
- factorial in C++ code 2011
- what are Templates?
- write a function to calcute the power of some number, will...
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)