就是你的Student构造函数,与调用时指定的参数类型没有匹配的 你参数使用"dotcpp",这属于const char *,但你构造函数只有char*这种,所以不匹配 将构造函数中的char*改为 const char*,应该就可以了 或者在main里先定义一个 char s[10] = "dotcpp",然后 Student A(100,s,11);也行
Student的构造函数改成Student(int n,const char * str,int s)