using namespace std;
#include<string>
class building{
friend void goodgay(building *build);
public:
building()
{
m_sittingroom="客厅";
m_bedroom="卧室";
}
public:
string m_sittingroom;
private:
string m_bedroom;
};
//全局函数
void goodgay(building *build){
cout<<"好基友函数正在访问"<<build->m_sittingroom<<endl;
cout<<"好基友函数正在访问"<<build->m_bedroom<<endl;
}
void test1(){
building build;
goodgay(&build);
}
int main(){
test1();
//test2();
return 0;
}