struct关键字与class关键字区别

  • 唯一的区别:默认成员访问说明符及默认派生访问说明符。
  • struct:默认public(公有)
  • class:默认private(私有)

你可能感兴趣的:(c++)