#include
#include
class B;
class A{
public :
void func(B b);
};
class B{
private :
int i;
public:
B():i(3){};
friend void A::func(B b);
};
class C:public A{
};
void A::func(B b){
cout<}
int main()
{
B bb;
C c;
c.func(bb);
getchar();
return 0;
}
阅读(2018) | 评论(1) | 转发(0) |