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
What is object in oops?
What are the components of marker interface?
Why it is called runtime polymorphism?
What is the difference between abstraction and polymorphism?
Whats oop mean?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is an advantage of polymorphism?
What is object-oriented programming? Webopedia definition
What is abstraction in oop with example?
Get me an image implementation program.
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What is polymorphism programming?
What is variable example?
What is this pointer in oop?
What is overloading in oops?