摘要: 友元 友元函数定义在外部,但有权访问类的所有私有成员和保护成员。 关键字:friend 1.全局函数做友元 class building { public: //初始化 building(string a,string b):m_sittingroom(a),m_bedroom(b){} strin 阅读全文
posted @ 2021-08-04 19:29 pleasurea 阅读(40) 评论(0) 推荐(0)