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
).
这篇关于C++中的结构继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!