Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are guid? Why does com need guids?

1055


What is long in c++?

1249


Explain the pure virtual functions?

1125


What is ios :: in in c++?

1070


Why do we need function?

1055


What is a c++ object?

1176


What are the various access specifiers in c++?

1034


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1081


What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero

1102


What is lambda in c++?

1235


What is a node class in c++?

1073


What is the difference between reference and pointer?

1159


What is class in c++ with example?

1277


What size is allocated to the union variable?

1061


What is pointer in c++ with example?

1075