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
Is c++ still being used?
Is set c++?
What is function prototyping?
What do you mean by stack unwinding in c++?
Does std endl flush?
What is the syntax for a for loop?
What is the use of class in c++?
What is object file? How can you access object file?
What is null and void pointer?
What are c++ manipulators?
What is c++ similar to?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
Is it possible to write a c++ template to check for a function's existence?
What is flush programming?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..