Answer Posted / hrpynux@gmail.com
A virtual function is a member function that you expect to be redefined in derived classes. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why pointer is used in c++?
Can I create my own functions in c++?
Can c++ be faster than c?
Describe linked list using C++ with an example.
Why c++ is created?
What is c++ best used for?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
How are Structure passing and returning implemented by the compiler?
What are the uses of c++ in the real world?
What do you mean by a template?
Why do we use string in c++?
What are punctuators in c++?
Define what is constructor?
What is an overflow error?
What is the basic structure of a c++ program?