• 1 class或struct后面的冒号是用来定义类的继承 例如 class 派生类名 继承方式 基类名 派生类的成员 struct B A char b 继承方式 public private和protected 默认处理是public 2