3 ms·
Yes, that is different, because in C++ you can move j forward and backwards.
by klodolph 8y ago
Yes, that is different, because in C++ you can move j forward and backwards.
- arcticbull 8y agoAhh, I see, thanks for clarifying. Rust's Iterators are similar to C++ ForwardIterators. It seems C++'s default is BidirectionalIterator.
- klodolph 8y agoEven C++ ForwardIterators are more powerful, because you can move them independently. Rust lets you move the beginning of the range forwards, and maybe the end of the range backwards. With ForwardIterator you would be able to move the end of the range forwards, making the range longer.