error C2678: binary '==' : no operator defined which takes a left-hand operand
轨迹- 2017-06-14 11:53:58 mfc出现这样的错误:error C2678: binary '==' : no operator defined which takes a left-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' (or there is no
acceptable conversion)
怎么办 急急急!!!
错误指着这里错了:
int flag = 0;
CCarSystem *stu = new CCarSystem;
stu->m_spinpai = m_strpinpai;
string temp;
ifstream in("a.txt");
while(in >> temp) {
if(temp==stu->m_spinpai) {
flag = 1;
MessageBox("该品牌已存在!", "注意");
in.close();
m_strpinpai = "";
UpdateData(false); // 只将学号清空,其余信息保留
return;
}
}
in.close();
有==那里