Playing around with for arguments
Inspired by this.
Suppose we have a non empty std::vector<T> v; is there any difference between
for (int i = v.size() - 1; i >= 0; i--) {
///Stuff.
}
and:
for (int i = v.size(); i--; ) {
///Stuff.
}
?
I mean, I wouldn't do that for readability sake, but who knows what could
be useful in life...
No comments:
Post a Comment