16
I usually iterate over a vector that way:
for (int i = 0; i < myVector.size(); i++) {
Element* e = myVector[i];
}
But then the compiler usually gives me this warning:
warning: C4018: '<' : signed/unsigned mismatch
So if an int is not right, which type should the index be? vector::size() seems to be of a "size_type" type, but I'd rather use a more meaningful type. Any suggestion?