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
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is the default width for ouputting a long integer using the insertion operator?
Difference between an inspector and a mutator
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Briefly describe a B+ tree. What is bulk loading in it?
Is multimap sorted c++?
What is :: operator in c++?
What does n mean in c++?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What is the use of lambda in c++?
Define a nested class. Explain how it can be useful.
State the difference between delete and delete[].
what are the characteristics of Class Members in C++?
why is iostream::eof inside a loop condition considered wrong?
Is c++ a software?