Original Post
If I have two class like this: will var_A.x_squared = 100; ? I know that this seems like a silly question but it represents a much more complicted case. Thanks.
class B;
class A{
public:
int x, x_squared;
B* p_toB;
void Update(){x_squared = p_toB->pow2();}
};
class B{
public:
A* p_toA;
int pow2(){return(p_toA->x*p_toA->x);}
};
A var_A;
var_A.x=10;
var_A.Update();