protected inheritance and abstract classesView more random threads:
- c++ linux ubuntu 10.04 help with GUI in c++ 2011
- Consitional Operator in C++ July 2011
- tool of trade in c++ May 2011
- how to use system("pause"); in Dec C++
- how many malloc ,calloc and realloc take arguments in c++
- adding rows and columns of a multi array in c++ 2011
- Declaration are Definition are the function in c++ May 2011
- What is cope and complexity in c++ 2011 ?
- Multidimensional Array vs If-Statements and Functions? in...
- What is the object state. 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)