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 prototype for that c string function?
Why cout is used in c++?
What is rtti in c++?
What is the exit function in c++?
What is a c++ object?
What is the precedence when there is a global variable and a local variable in the program with the same name?
What do you mean by storage classes?
What is abstraction c++?
Which is the best c++ compiler for beginners?
Can a program run without main?
Why is polymorphism useful?
Which function cannot be overloaded c++?
Differences between private, protected and public and give examples.
What is object oriented programming (oop)?
What is struct c++?