我不知道如何处理这个问题,其中一个类使用共享指针,但我想通过这个指针从另一个类中调用它的方法。bar->OnChange(this); // <=== this wont work std::shared_ptr<Bar> bar;我如何创建我应该将OnChange(Foo* foo)添加到Bar中吗?
其他解决方案?
我有一个从A类中的静态函数返回的bool类型的静态变量,这个变量后来在B类中被访问,比如A::StaticFUn()这意味着当C类使用它时,我应该得到A类的最新值或实时值。>addvalue(MessagePolicy::getDelayMessages()) // what happens here, is it