友元函数

作用

在类外部也能使用友元函数或友元类

定义

在类1的内部定义friend 类Afriend void fun()

原文地址:https://www.cnblogs.com/code-fun/p/15430046.html