You have one base class virtual function how will call that
function from derived class?
Answer Posted / narendra
class A
{
public:
virtual void fun()
{
cout<<"class A\n";
}
};
class B:public A
{
public:
virtual void fun()
{
cout<<"class B\n";
A::fun(); //calling base class virtual function.
}
};
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Is oop better than procedural?
What are properties in oop?
write a program that takes input in digits and display the result in words from 1 to 1000
How is polymorphism achieved?
What does and I oop mean?
program for insertion ,deletion,sorting in double link list
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
Can bst contain duplicates?
How to improve object oriented design skills?
Why do we need oop?
Why is destructor used?
What is object-oriented programming? Webopedia definition
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is polymorphism and example?
What is basic concept of oop?