The keywords
class and
struct both declare a so-called
class type.
The declared class will have different properties, such as default
member access, depending on whether class
or struct
was used.
?inline
- members
private
by default private
inheritance from base class by default- incompatible with C
- typically used for larger classes
?inline
- members
public
by default public
inheritance from base class by default- compatible with C
- typically used for aggregates, traits