You have one base class virtual function how will call that
function from derived class?

Answer Posted / swetcha

class a
{
public virtual int m()
{
return 1;
}
}
class b:a
{
public int j()
{
return m();
}
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between class and object with example?

571


What is inheritance in simple words?

631


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2014


which feature are not hold visual basic of oop?

1727


What is inheritance write a program to show use of inheritance?

617






How Do you Code Composition and Aggregation in C++ ?

24223


What is polymorphism explain?

698


can we make game by using c

3438


What is polymorphism in oops with example?

537


What is polymorphism what are the different types of polymorphism?

570


Give two or more real cenario of virtual function and vertual object

1858


How is class defined?

594


How long to learn object oriented programming?

574


State what is encapsulation and friend function?

703


What is balance factor?

589