我想构建一个新的结构,它继承了其他多个结构,就像这样:
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中的多个结构?
谢谢你的帮助
发布于 2017-09-13 15:12:12
不,e中没有多重继承。然而,不久前添加了接口,这可能是最接近的东西。
你的目的到底是什么?在某些情况下,'struct_member‘宏或子类型可以完成多重继承所期望的工作。
https://stackoverflow.com/questions/46172036
复制相似问题