• + 8 comments

    I learned a funny thing by doing this... in C++, the vector.size() method returns an unsigned int, so subtraction might silently wrap around to a large number, instead of a negative one. I can't believe I've never encountered this problem before...