class Class2;
\
class Class1{ \
private: \
int m;
\
public: \
void display( Class2 &cl2 ); \
Class1():m(1){} \
friend class Class2; \
void print(){cout\<\<"m="\<\<m\<\<endl;} \
};
\
class Class2{ \
private: \
int m;
\
public: \
friend void Class1::display( Class2 &cl2 ); \
Class2():m(2){} \
void print( Class1 &cl1 ){cout\<\<"m="\<\< cl1.m \<\< endl;} \
};
\
void Class1::display( Class2 &cl2 ){\
cout \<\< cl2.m \<\< endl; \
}