📅 2009-Sep-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ containers, swapping ⬩ 📚 Archive
Swapping elements of a C++ STL container is same as swapping normally.
// Swapping 2 elements of a STL container
#include <algorithm>
std::swap(ivec.at(0), ivec.at(1)); // Swap [0] & [1]