用class和struct关键字定义类的唯一区别在于默认访问级别:默认情况下。struct的成员为public,而class的成员为private。继承时也是如此,class默认为private继承,而struct为public继承。