protected inheritance and abstract classesView more random threads:
- main() differences in c++ 2011
- f i use hints for book ie(c++ How to Program 5th Edition)...
- how stack operation proves costly during traversing a tree
- Configuring openAL in Dev C++
- Please define function calling in C++?
- when we push F1 key to step into a subroutine?
- Difference b/w encapsulation and information hiding
- What is polymorphism in c++ 2011
- How to Deal With Errors in C Programming ? 2011-12
- Which of the function call is call by value for the...
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)