这行错误信息是什么意思

来源:百度知道 编辑:UC知道 时间:2024/06/19 21:11:12
'__thiscall CStudent::CStudent(const class CStudent &)' : cannot convert parameter 1 from 'char [2]' to 'const class CStudent &'
Reason: cannot convert from 'char [2]' to 'const class CStudent'
No constructor could take the source type, or constructor overload resolution was ambiguous

类型不匹配。
也就是系统不能自动把char [2]转成CStudent。

不能把char [2]转成CStudent

可能是你的构造涵数写错了,应该用char [2]做参数的.
也可能生成CStudent实例时形参给错了.