C++类之struct

Student.h

main.cpp
C++中class和struct区别:
- C++中class类中的成员默认都是
private属性的;而使用 struct 时,结构体中的成员默认都是public属性的 - https://m.haicoder.net/cpp/cpp-class-struct.html
- https://zh-google-styleguide.readthedocs.io/en/latest/google-cpp-styleguide/classes/#vs
- 实现仿函数时可用
struct关键字

浙公网安备 33010602011771号