How to avoid a class from instantiation?
Answer Posted / vinay bondade
Have a Pure Virtual function in the class. This will not
allow to create an object of the class and hence cannot be
instatiated. But its a different thing to inherit the class
and give definition to Pure Virtual function, But the class
alone cannot be instantiated.The class hence,is also called
Abstract Base class.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What are the various compound assignment operators in c++?
Const char *p , char const *p What is the difference between the above two?
What is the best c c++ compiler for windows?
What is function overriding in c++?
Can we make copy constructor private in c++?
What is setf in c++?
what do you mean by volatile variable?
Is c++ built on c?
How do I get good at c++ programming?
Can a function take variable length arguments, if yes, how?
What is #include iostream h in c++?
State the difference between pre and post increment/decrement operations.
Explain the uses oof nested class?
Describe public access specifiers?
What are the four main data types?