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 would you stop a class from class from being derived or
inherited?The constructer should not be Private,as object
instantiation should be allowed.

Answer Posted / boriska

make destructor private. Derived class would not be able to
access it, and compiler will produce error, when instance of
derived class is deallocated.

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between global int and static int declaration?

1147


What is the size of a vector?

1193


What is the difference between struct and class?

1646


What is the main use of c++?

1166


How do I write a c++ program?

1168


what is Member Functions in Classes?

1283


What is the difference between the parameter to a template and the parameter to a function?

1162


How did c++ start?

1150


How many different levels of pointers are there?

1274


Can comments be nested?

1075


Explain pass by value and pass by reference.

1102


what are function pointers?

1138


Do the names of parameters have to agree in the prototype, definition, and call to the function?

1075


what is data encapsulation in C++?

1121


what is the difference between overloading & overriding? give example.

1263