You have one base class virtual function how will call that
function from derived class?
Answers were Sorted based on User's Feedback
Answer / kalaivani
u can call the base class virtual fn,if it is declare as
public
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
Answer / mazher
class B:A
{
public override void A_Func()
{
base.A_Func();
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Program to open a file with First argument
what is new operator in c++
What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the scope resolution operator while accessing them. I want to know some other advantages of unnamed namespaces...
What are the access specifiers avaible in c++?
what is the difference between ERROR and EXCEPTION?
What do you mean by variable?
What is difference between pop and oop?
What is the use of fflush(stdin) in c++?
how to find the largest of given numbers in an array
write a c++ program to find maximum of two numbers using inline functions.
What are the advantages of polymorphism?
What is the difference between procedural programming and oops?