使用 class 和 struct 时有区别吗?如果有,是什么? 答:使用 class 和 struct 定义类,唯一的区别就是默认的访问权限。 class 默认 private ; struct 默认 public 。