interrelated friend classes

is it possible for 2 classes access the private data members of each other without being related in any way(I mean inheritance) and still have privacy as far as other classes are concerned... something like friend functions ----> friend classes.
you can have friend classes
1
2
3
4
5
6
7
class a {
friend class b;
};

class b {
friend class a;
};


Is the syntax you're looking for. It works just like a friend function.
that works?? really??
I am such a dumb ass, I should have thought about it...

Thanx... :)
Topic archived. No new replies allowed.