What are the differences between struct and class in C++?

后端 未结 30 3256
盖世英雄少女心
盖世英雄少女心 2020-11-21 05:38

This question was already asked in the context of C#/.Net.

Now I\'d like to learn the differences between a struct and a class in C++. Please discuss the technical d

30条回答
  •  时光说笑
    2020-11-21 06:10

    ISO IEC 14882-2003

    9 Classes

    §3

    A structure is a class defined with the class-key struct; its members and base classes (clause 10) are public by default (clause 11).

提交回复
热议问题