error C2678: '==' binary: no operator found which takes a left operand of type 'CSchemaString' (or t

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span style="font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; font-size:14px; text-align:left I am transferring a project from <code style="margin:0px; padding:1px 5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; text-align:left VC++6[/code]<span style="font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; font-size:14px; text-align:left to <code style="margin:0px; padding:1px 5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; text-align:left VC++
2005[/code]<span style="font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; font-size:14px; text-align:left , and on compilation I get the following error.
error C2678: == binary: no operator found which takes a left operand of type CSchemaString (or there is no acceptable conversion)
<span style="font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif; font-size:14px; text-align:left HERE IS THE CODE;
<pre class="x_x_default x_x_prettyprint" style="padding:5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; width:auto; max-height:600px; text-align:left <span class="x_x_Apple-tab-span" style="white-space:pre CSchemaString References("id");<br/><span class="x_x_Apple-tab-span" style="white-space:pre for(j=0;j<=tpChild.GetUpperBound();j++)<br/><span class="x_x_Apple-tab-span" style="white-space:pre {<br/><span class="x_x_Apple-tab-span" style="white-space:pre if(References == "id") // error C2678: == binary: no operator found which takes a left operand of type CSchemaString (or there is no acceptable conversion)<br/><span class="x_x_Apple-tab-span" style="white-space:pre References = References + intToString(((Component*)tpChild.GetAt(j))->GetComponentID()) +"_"+ ((Component*)tpChild.GetAt(j))->GetName();<br/><span class="x_x_Apple-tab-span" style="white-space:pre else<br/><span class="x_x_Apple-tab-span" style="white-space:pre References = References + " id" + intToString(((Component*)tpChild.GetAt(j))->GetComponentID()) +"_"+((Component*)tpChild.GetAt(j))->GetName();<br/><span class="x_x_Apple-tab-span" style="white-space:pre }<br/><span class="x_x_Apple-tab-span" style="white-space:pre if(References != "id") //if references is not empty<br/><span class="x_x_Apple-tab-span" style="white-space:pre XComponent.AddPlant_Item_Ref(References);<br/><br/><br/><br/><span class="x_x_Apple-tab-span" style="white-space:pre return XComponent;<br/>} ANY HELP IS APPRECIATED. [/code]
<br/>

View the full article
 
Back
Top