Original Post
I'm curios about swapping data between two vectors and what will happen in the following code.
Will the switch affect both vectors or just the one calling swap()?
Will the switch affect both vectors or just the one calling swap()?
std::vector<bool>::iterator i;
std::vector<bool>::iterator j;
j = b.begin();
for(i = a.begin();i != a.end();i++)
{
a.swap(i,j);
j++;
}