protected inheritance and abstract classesView more random threads:
- how to insert a new node on AVL tree using double rotation?
- why we use class in C++ May 2011 ?
- what is difference b/w characteristic, behavior and...
- can we define same functions for the two or more different...
- how can i mail you the snapshot of compiled files.in C++...
- what is Topic base content management system? How it looks...
- What is the difference between “object = this->object” and...
- how to use system("pause"); in Dec C++
- constructor and destructor in c++ 2011
- forward declaration instead of header files in 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)