I am migrating the visual studio 2008 vc++ projects to visual studio 2013. I am facing c3892 when migrating one of my projects.Here I am providing sample piece of code which reproduces the the error Iam facing in migration.
int _tmain(int argc, _TCHAR* argv[]){
int myints[] = {21,64,17,78,49};
std::set<int> myset (myints,myints+5);
std::set<int>::reverse_iterator rit;
std::cout << "myset contains:";
for (rit=myset.rbegin(); rit != myset.rend(); ++rit)
if(*rit==64)
*rit=90;
return 0;
}
If we execute the above piece of code in vs2013 ,Iam throwing an error
Error error C3892: 'std::_Revranit<_RanIt,_Base>::operator *' : you cannot assign to a variable that is const
But if we execute the same piece of code visual studio 2008, Iam not getting any type of errors the build is successful.
I must change the value in my project. Please provide me the solution how to get rid of this error.
Thanks in advance. phani