How to avoid a class from instantiation?
Answer Posted / chandrakant
make the class Abstract it will not be instantiated
and the pure virtual function is used to avoid the base call
function to be get called if we make a function as virtual
only a derived class function will get called
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the difference between struct and class?
Can a constructor be private?
Carry out conversion of one object of user-defined type to another?
Is c++ a pure oop language?
Why is c++ not purely object oriented?
What is a c++ map?
What do you mean by inheritance in c++? Explain its types.
What is diamond problem in c++?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
What is the difference between delegation and implemented-in-terms-of?
What is an adaptor class in c++?
What is the difference between a template and a macro?
How would you obtain segment and offset addresses from a far address of a memory location?
Explain Text Manipulation Routines?
What is the size of a vector?