I myself am convinced that in a project I\'m working on signed integers are the best choice in the majority of cases, even though the value contained within can never be neg
vector.size() returns a size_t var, so just change int to size_t and it should be fine.
vector.size()
size_t
int
Richard's answer is more correct, except that it's a lot of work for a simple loop.