<分区>
friend ostream &operator<<(ostream &os, const CSnmpMaintenanceSwitch &sw);
<分区>
friend ostream &operator<<(ostream &os, const CSnmpMaintenanceSwitch &sw);
最佳答案
好吧,这意味着它存在一个运算符 <<(肯定在全局命名空间中或在当前类的命名空间中),将 ostream & 作为第一个参数,将 const CSnmpMaintenanceSwitch & 作为第二个参数,并且此运算符可以访问 private您当前类(class)的成员(肯定是 CSnmpMaintenanceSwitch)
关于c++ - 请解释一下这个好友声明是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17269433/