[c++] Struct inheritance in C++

Can a struct be inherited in C++?

This question is related to c++ inheritance struct

The answer is


Yes, struct is exactly like class except the default accessibility is public for struct (while it's private for class).


Similar questions with c++ tag:

Similar questions with inheritance tag:

Similar questions with struct tag: