Using the STL to swap the elements kind of defaults the purpose of implementing the bubble sort, doesn't it? If you can use iter_swap or swap, consider using sort, too!
i used the iter_swap function...
however its not swapping the elements....
here is the code :
one.printAll();
vector<CellPos>::iterator it;
vector<CellPos>::iterator it2;
it=one.structure.begin();
it2=one.structure.end();
iter_swap(it,it2);
one.printAll();