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
How can you say that a template is better than a base class?
What is public, protected, private in c++?
What character terminates all character array strings a) b) . c) END
What is an object in c++?
What is istream c++?
Which should be more useful: the protected and public virtuals?
What is the use of class in c++?
How is modularity introduced in C++?
What is a class template in c++?
What is increment operator in c++?
What is a storage class? Mention the storage classes in c++.
How much do coding jobs pay?
Write a program to show polymorphism in C++?
What is data structure in c++?
What are the benefits of operator overloading?