   Undeclared member functions as friends
  Is it in any way possible to do the equivalent of this: class Alpha{private:friend int Beta::GetX( Alpha& A );int x;};class Beta{public:int GetX( Alpha& A ){return A.x;}};without making Alpha a friend of all of Beta?[edited by - Rayno on March 23, 2004 12:11:55 AM]
  Yeah, but you need to order your code properly: class Alpha;class Beta{public:int GetX( Alpha& A );};class Alpha{private:friend int Beta::GetX( Alpha& A );int x;};// in cpp-fileint Beta::GetX( Alpha& A );{return A.x;}