differences between a class and a struct

Differences between a class and a struct are that structs have default public members and bases and classes have default private members and bases. Both classes and structs can have a mixture of public and private members,can use inheritance and can have member functions.
参考链接:https://stackoverflow.com/questions/54585/when-should-you-use-a-class-vs-a-struct-in-c

你可能感兴趣的:(differences between a class and a struct)