I want to reverse an array of chars using 2 iterators, but i figured out that i entry the loop once and swap() never worked. `
std::vector<char> s = {'a','b','c','d'};
std::vector<char>::iterator it1{s.begin()}, it2{s.end() - 1};
while(it1 < it2){
swap(it1,it2);
++it1;
--it2;
}
`
If i write while(it1 != it2),I will never get out of the loop. Could you explain where the mistake is.