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 are the rules for naming an identifier?
What is c++ mutable?
Explain about vectors in c ++?
Which is not a valid keyword a) public b) protected c) guarded
What is the difference between global variables and static varables?
What is the use of endl in c++ give an example?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
what are the iterator and generic algorithms.
Can you please explain the difference between overloading and overriding?
Who discovered c++?
which operator is used for performing an exponential operation a) > b) ^ c) none
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
what is a class? Explain with an example.
Where and why do I have to put the "template" and "typename" keywords?
What are enumerations?