answersLogoWhite

0

Private virtual functions are useful when you expect a particular method to be overridden, but do not wish the override to be called from outside of the base class. That is, the base class implementation and its overrides remain private to the base class.


Private virtual methods are particularly useful in implementing template method patterns, where certain algorithmic steps need to be deferred to subclasses, but where those steps need not be exposed to those subclasses. In many cases the private virtual methods will be declared pure-virtual, thus rendering the base class an abstract base class.


User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you represent a C plus plus non-pure virtual function in UML?

All virtual functions (including pure-virtual functions) are represented in italics. All non-virtual functions are represented normally. There is no differentiation between pure and non-pure virtual functions, however some people append "=0" to distinguish the pure-virtual functions.


What is virtual function table?

A virtual function table is a table of pointers to functions.


Which binding virtual function used?

Virtual functions are dynamically bound at runtime.


What types of functions cannot be made virtual?

Static member functions, member function templates and constructors cannot be virtual.


What are the Functions and importance of preamble?

what is the function and importance of preamble


Do you use virtual functions in Java?

Every method in java that isn't a class (static) method is automatically "virtual." If you want to disable virtual overrides, make the method "final" in the base class.


Which function are used in dyanamic programming handling?

Virtual functions.


What are the importance of circular functions in everyday life?

importance of circular function


How does virtual function support run time polymorphism?

Virtual functions are used to suport runtime polymorphism.In C++,if we have inheritance and we have overridden functions in the inherited classes,we can declare a base class pointer and make it to point to the objects of derived classes.When we give a keyword virtual to the base class functions,the compiler will no do static binding,so during runtime ,the base class pointer can be used to call the functions of the derived classes.Thus virtual functions support dynamic polymorphism.


What functions are completely unsupported in DOS?

DOS had no support for virtual memory, no native GUI, and no built in security functions.


How is run time polymorphism accomplished?

Through inheritance and virtual functions.


What is the importance of using functions in a c program?

C programs do not function without functions.