Home > Back-end >  Binary "==" : found no accept "STD: : _Vector_iterator <_Myvec>" type of t
Binary "==" : found no accept "STD: : _Vector_iterator <_Myvec>" type of t

Time:10-21

//to meet the most left character conditions of the character, the result for the last meet the conditions of characters
Vector : : iterator itss=struA. The begin ();

While (itss!=struA. End ()) {
If (itss - & gt; M_pos. M_bottom & gt;=iMiddleY & amp; & Itss - & gt; M_pos. M_top & lt;={iMiddleY)
Pleft - & gt; M_iIndex=itss - & gt; M_iIndex;
Pleft - & gt; M_iType=itss - & gt; M_iType;
Pleft - & gt; M_iType2=itss - & gt; M_iType2;
Pleft - & gt; M_iMiddleY=itss - & gt; M_iMiddleY;
Pleft - & gt; M_pos. M_bottom=itss - & gt; M_pos. M_bottom;
Pleft - & gt; M_pos. M_left=itss - & gt; M_pos. M_left;
Pleft - & gt; M_pos. M_right=itss - & gt; M_pos. M_right;
Pleft - & gt; M_pos. M_top=itss - & gt; M_pos. M_top;
Pleft - & gt; M_iMiddleX=itss - & gt; M_iMiddleX;

Ves. Push_back (* pleft);
}
+ + itss;
}

//the left

The delete pleft;

If (ves. The begin ()==NULL)//////////////////////////////

{
//delete pp;
return;
}
Vector : : iterator itb2=ves. The begin ();
Vector : : iterator itb1=ves. The begin ();
for (; Itb1!=ves. End (); + + itb1) {
For (itb2=itb1; Itb2!=ves. End (); + + itb2) {
If (itb1 - & gt; M_pos. M_left & gt; Itb2 - & gt; M_pos. M_left) {
Itb1 - & gt; M_iIndex=itb2 - & gt; M_iIndex;
Itb1 - & gt; M_iType=itb2 - & gt; M_iType;
Itb1 - & gt; M_iType2=itb2 - & gt; M_iType2;
Itb1 - & gt; M_iMiddleY=itb2 - & gt; M_iMiddleY;
Itb1 - & gt; M_pos. M_bottom=itb2 - & gt; M_pos. M_bottom;
Itb1 - & gt; M_pos. M_left=itb2 - & gt; M_pos. M_left;
Itb1 - & gt; M_pos. M_right=itb2 - & gt; M_pos. M_right;
Itb1 - & gt; M_pos. M_top=itb2 - & gt; M_pos. M_top;
Itb1 - & gt; M_iMiddleX=itb2 - & gt; M_iMiddleX;
}
}
}

Pp StruAna *=new StruAna;
Vector : : iterator ita=ves. The begin ();

Pp - & gt; M_iIndex=ita - & gt; M_iIndex;
Pp - & gt; M_iType=ita - & gt; M_iType;
Pp - & gt; M_iType2=ita - & gt; M_iType2;
Pp - & gt; M_iMiddleY=ita - & gt; M_iMiddleY;
Pp - & gt; M_pos. M_bottom=ita - & gt; M_pos. M_bottom;
Pp - & gt; M_pos. M_left=ita - & gt; M_pos. M_left;
Pp - & gt; M_pos. M_right=ita - & gt; M_pos. M_right;
Pp - & gt; M_pos. M_top=ita - & gt; M_pos. M_top;
Pp - & gt; M_iMiddleX=ita - & gt; M_iMiddleX;

Pp m_left. Push_back (*);



Vector : : iterator itst=struA. The begin ();

While (itst!=struA. End ()) {
If (itst - & gt; M_pos. M_left==ita - & gt; M_pos. M_left) {
Itst=struA. Erase (itst);
- itst;
}
+ + itst;
}
The delete pp;
}
Direct source code, is the disc in VS2010 appear this mistake, how should solve?

CodePudding user response:

 if (ves. The begin ()==NULL) 

It should be
 if (ves) begin ()==ves) end ()) 

CodePudding user response:

Appeared to be an error, but the program is running will be interrupted,
  • Related