iterator vector::end() returns funny result

So far this run-time error only happens in UE DevelopmentEditor environment. In a particular case, I used vector::find() to search for an element in a vector array. If it returned it = vector::end(), I pushed a new element to the end, and used std::distance(vector::begin(), it) to get the index of newly pushed element–it didn’t work I expected, even though it worked fine in debug mode. Didn’t figure out why. (VariableLoader.h)

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *

The AI Project