how to swap string characters in c++

C++
#include <string>
#include <algorithm>

std::string s = "03/02";
std::swap(s[1], s[4]);
Source

Also in C++: