Hello Friends,
#include "iostream.h"
class A
{
public:
void fun( int i )
{
cout<<"A:Fun"<endl
}
};
class B
{
public:
void fun( int i, int j )
{
cout<<"B:Fun"<endl
}
};
class C: public A, public B
{
public:
void Print()
{
cout<<"C:Print"<<endl;
}
};
int main()
{
C obj;
obj.fun(0);
}
When I am trying to compile this code I am getting the error C2385: 'C::fun is ambiguousin VC6.
I am not able to understand why I am getting this error because the function fun is having the different number of argument in class A and class B. Even I change the type of the argument compiler is giving the same error.