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 / mms zubeir

Thanks for your detailed answer. It's good to see you have
achieved the purpose partially by using static methods.
Still, we cannot create objects on the stack rather it
allows to create objects only on the heap. This is because,
we have to call the destructor using delete. You have
provided static methods to do that.

The compiler will not allow to create stack objects since
it cannot be able to invoke the destructor when unwinding
stack.

I do not have an idea how to fulfill this requirement.
Anyway, you have rolled out the solution to some extent.
Thanks.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name four predefined macros.

990


What is the purpose of templates in c++?

987


What is function overloading c++?

1021


Is c++ the hardest programming language?

1073


What is c++ vb?

1028


Can a constructor return a value?

1163


What is the iunknown interface?

1074


How are pointers type-cast?

1061


Is c++ harder than java?

1003


Why do we need c++?

987


What is scope operator in c++?

1036


What is istream c++?

1121


Carry out conversion of one object of user-defined type to another?

987


What is an operator in c++?

995


Can we use this pointer inside static member function?

1021