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

Can you pass an array to a function in c++?

992


Explain what happens when a pointer is deleted twice?

1240


What is basic if statement syntax?

1059


How do I use arrays in c++?

987


What is the most useful programming language?

1033


What is class in c++ with example?

1239


What is the prototype of printf function?

1166


Define whitespace in C++.

1193


What is the difference between a reference and a pointer?

1093


Is map ordered c++?

1084


Explain the use of vtable.

1069


What is vector pair in c++?

1210


What is string in c++ programming?

1158


What are the defining traits of an object-oriented language?

1187


What are pointer-to-members? Explain.

1127