Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想构建一个从其他多个结构继承的新结构,如下所示:
struct new_struct like struct_a, struct_b, struct_c is { // The new_struct supposed to have all the fields of struct a/b/c };
有没有办法从 E 中的多个结构继承?
谢谢您的帮助
不,e 中没有多重继承。但是,不久前添加了接口,这可能是最接近的东西。
你的目的到底是什么?在某些情况下,“struct_member”宏或子类型可以完成多重继承所期望的工作。