I have been written 2 classes A,B.
and I want class A to use class B and vice verse
but I have a problem when I tried to get the content of the class like(*A)
that's my code.
#pragma once
#include<iostream>
using namespace std;
class B;
class D
{
B* b;
public:
D(void){
B n(void);
(*b)=n; //error but why????
}
~D(void){
}
};
#pragma once
class D;
class B
{
D* d;
public:
B(void){
}
~B(void){
}
};