Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 1.01 KB

class_struct.md

File metadata and controls

23 lines (20 loc) · 1.01 KB

What is the Difference Between class and struct?

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.

class

?inline

  • members private by default
  • private inheritance from base class by default
  • incompatible with C
  • typically used for larger classes

struct

?inline