|
-
November 22nd, 2002, 11:14 PM
#1
friend class access
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|