Answer Posted / bijal
The virtual function can be allowed in base classes only.
The functions markd Virtual will only be overridable in
derieved classes.
If i m having a function in base class that shud come in
derieved class but i want it to have different behaviour.
This can only be acheived only if base class function is
virtual function.
| Is This Answer Correct ? | 23 Yes | 8 No |
Post New Answer View All Answers
What does and I oop and sksksk mean?
Why is object oriented programming so hard?
What is the advantage of oop over procedural language?
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
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
How do you answer polymorphism?
what are the realtime excercises in C++?
What is the oops and benefits of oops programming?
explain sub-type and sub class? atleast u have differ it into 4 points?
#include
What is debug class?what is trace class? What differences are between them? With examples.
What are the data types in oop?
What is polymorphism what are the different types of polymorphism?
Can you explain polymorphism?
What is the problem with multiple inheritance?