protected inheritance and abstract classesView more random threads:
- const. pointer or pointer to const. char
- how i can leave spaces between my program output
- C++ Help with Template class program 2011
- convert template to int in c++
- adding rows and columns of a multi array in c++ 2011
- what is the difference between abstract class and concerete...
- What are constant members functions in c++ 2011
- What is entity with respect to object oriented programming
- i used if statment to stop the program and prompt the error...
- A partial specialization may inherit from an ordinary class
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)