c++ 类 A类调用B类

1、方法一

在A类中声明private:B类的ptr_B指针,然后其他函数可以ptr_B=new B;接着就可以ptr_B->B的fun了;

原文地址:https://www.cnblogs.com/wllwqdeai/p/10765239.html