protected inheritance and abstract classesView more random threads:
- why we use queues data structure for level order traverse?
- Overloaded >> operator not reading more than first line...
- What is mean by octet? how they are converted? in C++ 2012
- Is there Any difference b/w Object Oriented ProgrAmming And...
- what is object code? let say we have any line of source code
- Define function in c++ May 2011
- Visual Studio 2010 GUI
- I would able to program in c++ I would be able to program...
- difference between member functions,non member functions...
- Creating a Random String 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)