How to avoid a class from instantiation?

Answer Posted / vidushi

Make the class abstract
abstract class abc
{
.....
.....
};

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain virtual destructor?

906


Difference between pointer to constant and constant pointer to a constant. Give example.

844


What is malloc in c++?

728


What are the two main components of c++?

814


What are guid? Why does com need guids?

774


Explain public, protected, private in c++?

741


What is purpose of abstract class?

780


Why do we use classes in c++?

798


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

838


Why we use #include iostream in c++?

768


Which is the best c++ compiler for beginners?

779


What is the precedence when there is a global variable and a local variable in the program with the same name?

879


How do you declare A pointer to function which receives an int pointer and returns a float pointer

887


What is the benefit of learning c++?

720


What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

811