class B;
class A
{
int divident,divisor;
friend int B::test();
public:
A(int i,int j):divident(i),divisor(j){}
};
class B
{
public:
int test();
};
int B::test(){}
int main(){return 1;}
It throws following error in Qt Creator with Mingwin.
Why is it throwing an error for forward declaration of class B? May be I am making a silly mistake, but I am not able to find it.