摘要:
代码思路来自Thinking in C++ 10.13.1内部类方法。类似多重继承,但是类型转换是单向的:Outer支持“向上”转型,但是不能“向下”转型回Outer。#include #include using namespace std;class Interface1{public: virtual void function1() = 0;};void CallInterface1(Interface1& if1){ if1.function1();}class Interface2{public: virtual void function2() = 0;};void Ca 阅读全文