How would you stop a class from class from being derived or
inherited.
Answer Posted / vishaka
The class shoul be made abstract to stop it from being
derived or inherited. To make a class abstract, it should
have atleast one pure virtual function.
| Is This Answer Correct ? | 2 Yes | 21 No |
Post New Answer View All Answers
What is polymorphism and its types?
Why is encapsulation used?
What is polymorphism give a real life example?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What do you mean by Encapsulation?
What is advantage of inheritance?
What does <> mean pseudocode?
Can destructor be overloaded?
What is interface? When and where is it used?
What is constructor in oop?
Why is object oriented programming so hard?
Why do we use oops?
What is the difference between a constructor and a destructor?
Get me an image implementation program.
What is stream in oop?