2 ms·
I tend to use for (auto iter = something.begin(); iter != something.end(); ++iter) in C++. It's an abbreviation, but a clearer one (both to me and to the re
by eropple 13y ago
I tend to use
for (auto iter = something.begin(); iter != something.end(); ++iter)
in C++. It's an abbreviation, but a clearer one (both to me and to the reader of my code). An integer is (to me) an index, not an iterator, so I'd kind of call that misleading anyway.