protected inheritance and abstract classesView more random threads:
- how interface and implementation are seprated from each...
- But "cin" lines are not producing the results 2011
- how to pass a simlpe list of data type struct to function...
- Sorting code in c++
- error in c++
- how the information hidden within an object can be assessed...
- C++ stringstream array to int in c++ 2011
- how can we delete a node with two childs in binary...
- classes use in c++ May 2011
- Read data from file into arrays in c++ 2011
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)