I have a class that has a std::list of ints as a member. Let's say its
this:
std::list<int> MyInts;
Frequently, another list of ints is assigned to MyInts
MyInts = MyOtherInts;
This occasionally gives me a "First-chance exception" error. I haven't
a clue what this is or why it is happening. The problem is in the
following lines of STL code:
_Myt& operator=(const _Myt& _X)
{if (this != &_X)
{iterator _F1 = begin();
iterator _L1 = end();
const_iterator _F2 = _X.begin();
const_iterator _L2 = _X.end();
for (; _F1 != _L1 && _F2 != _L2; ++_F1, ++_F2)
//here---> *_F1 = *_F2;
erase(_F1, _L1);
insert(_L1, _F2, _L2); }
This is the worst bug I've ever had and i just don't know where to
start with fixing it. I would appreciate any advice you guys have to
offer.