0
我正在將項目從VC++6
轉換爲VC++ 2005
,並且在編譯時,我得到以下錯誤。錯誤C2678:'=='二進制:找不到操作符找到類型爲'CSchemaString'的左操作數(或者沒有可接受的轉換)
錯誤C2678:「==」二進制:沒有操作員發現它採用類型「CSchemaString」的左操作數 (或沒有可接受的轉化率)
這裏是代碼;
CSchemaString References("id");
for(j=0;j<=tpChild.GetUpperBound();j++)
{
if(References == "id") //error C2678: '==' binary: no operator found which takes a left operand of type 'CSchemaString' (or there is no acceptable conversion)
References = References + intToString(((Component*)tpChild.GetAt(j))->GetComponentID()) +"_"+ ((Component*)tpChild.GetAt(j))->GetName();
else
References = References + " id" + intToString(((Component*)tpChild.GetAt(j))->GetComponentID()) +"_"+((Component*)tpChild.GetAt(j))->GetName();
}
if(References != "id") //si references n'est pas vide
XComponent.AddPlant_Item_Ref(References);
return XComponent;
}
任何幫助表示讚賞。
但仍然不工作;任何其他方案 – user1541055 2012-07-21 11:11:28