c++ - Error c3892 iterator issue in VS2013 -


I am migrating a Visual Studio 2008 VC ++ project to Visual Studio 2013. I am getting a C3892 error when migrating one of my projects. I

Here are some sample codes that have the problem again : Generates:

  int _tmain (int argc, _TCHAR * argv []) {struct student {int id; Integer digits; Bull changed; The Bull Operator & lt; (Const student and RPPARM) const {return false; } Student (int a, int b) {id = a; Points = b; Change true =; }}; Student X (10,500), y (15,600); Std :: multiset & lt; Students & gt; Myset; Myset.insert (x); Myset.insert (y); Std :: multiset & lt; Students & gt; :: reverse_iterator ear; (ITR = MySasset. RBZ); IARAR = MySite.Rend (); ++ IARAR) {STD :: COAT & LT; & Lt; ITRAT-> ID & LT; & Lt; "\ N"; Std :: Court & lt; & Lt; Iter- & gt; From the trail of & lt; & Lt; "\ N"; Std :: Court & lt; & Lt; Iter- & gt; Has changed & lt; & Lt; "\ N"; Iter- & gt; Change = false; } Return 0; }   

An error throws in an attempt to compile the above:

  Error C3892: 'std :: _ Revranit & lt; _RanIt, _Base & gt; :: operator - & gt; ': You can not assign   

to a variable, however, the same code is compiled without error in Visual Studio 2008. Should I change the value in my project?

All multiset iterators in C ++ 11 points for one const elements. If you want to modify the element then you need to remove it and add a new one. As a hack you can declare the stratitic variable unstable (not recommended). Do this only when you make sure that what you are doing

  changed the unstable bull;   

In addition, you should write a proper operator & lt;.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -