Reputation: 51
I decided to replace
for (auto messageIterator = message.begin(); messageIterator != message.end(); ++messageIterator)
with
for (auto &messageIterator : message)
and it works. Then I decided to apply similar approach to this loop
for (auto alphabetIterator = alphabet.begin(), rotorIterator = rotor.begin(); alphabetIterator != alphabet.end(), rotorIterator != rotor.end(); ++alphabetIterator, ++rotorIterator)
and my code looks like this but it doesn't work.
for (auto &alphabetIterator : alphabet, &rotorIterator : rotor)
How do I fix it?
Upvotes: 0
Views: 74