友元函数

作用

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

定义

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

posted @ 2021-10-20 18:03  小帆敲代码  阅读(56)  评论(0编辑  收藏  举报