Aug 29, 2013 at 9:25am UTC
My program has no error and when I run it with VS2008 it gives:
"
Program...........
File:d:\program files (x86)\microsoft visual studio 9.0\vc\include\vector
Line:163
Expression:("_Myptr + _Off <= ((_Myvec *)(this->_Getmycont()))->_Mylast && _Myptr + _Off >= ((_Myvec *)(this->_Getmycont()))->_Myfirst", 0)
"
The segment mentioned of the file is
"
_Myt& operator+=(difference_type _Off)
{ // increment by integer
_SCL_SECURE_VALIDATE(this->_Has_container());
_SCL_SECURE_VALIDATE_RANGE(
_Myptr + _Off <= ((_Myvec *)(this->_Getmycont()))->_Mylast &&
_Myptr + _Off >= ((_Myvec *)(this->_Getmycont()))->_Myfirst);
_Myptr += _Off;
return (*this);
}
"
When I run it with VS2010 it gives:
"
File: c:\program files (x86)\microsoft visual studio 10.0\vc\vector
Line:157
Expression: vector iterator + offset out of range
"
I would really appreciate it if any of you can solve me problem!
Aug 30, 2013 at 9:44am UTC
Thank you for your advice. Woooo I am using an iterator for my vector and I was using while structure. I tried but your suggestion didn't work out.
Aug 30, 2013 at 10:25am UTC
Could you post the code causing the error? And by that I mean your code, not the library code where it is failing; step up the call stack.
Aug 30, 2013 at 12:02pm UTC
would you please show us your code?
Sep 1, 2013 at 7:59am UTC
I re-installed my VS and the problem has been solved~^.^ Seems that it was the problem of VS~