C++中的结构继承
struct
可以在 C++ 中继承吗?
Can a struct
be inherited in C++?
推荐答案
是的,struct
和 class
完全一样,只是默认的可访问性是 public
> 用于 struct
(而 private
用于 class
).
Yes, struct
is exactly like class
except the default accessibility is public
for struct
(while it's private
for class
).
相关文章