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
Why is main function important?
How come you find out if a linked-list is a cycle or not?
How the keyword struct is different from the keyword class in c++?
What is endianness?
What are the various operations performed on stack?
What is the extraction operator and what does it do?
Which one is better- macro or function?
Difference between pointer to constant and constant pointer to a constant. Give example.
Which compiler does turbo c++ use?
Keyword mean in declaration?
What is the difference between a pointer and a link in c ++?
What's the order in which the local objects are destructed?
What is encapsulation in c++?
What is a Default constructor?
Write a program to find the reverse Fibonacci series starting from N.