- Can I set an iterator to position 5 in a string via some member or do I have to do a
for(i = 0; i < 5; ++i) iterator++;? - Given an Iterator, how can I convert that to a numeric offset in the string?
- If this is not possible with std::iterators can boost do it?
Iterators <-> Offsets
You can use std::advance
or
You can use std::distance
or