Hi i have some code similar to below but i cant seem to get it to work as i would like. I'm wondering if what i'm doing is invalid. (ie. trying to use the struct defined in one class through its friend)

Class A{
friend class B;
private:
struct node{
//some variables in here
}

.....
}

Class B{
private
node *current;

....
}

I get an error implying that the current variable is not defined/recognized.

The only other way i can think of doing this is making a Class node but i think a struct is better and would like to do it this way if possible.