Używamy metody reverse() - Odwraca kolejność elementów w zakresie [first, last).
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
string tekst = "ABCD";
reverse(tekst.begin(), tekst.end());
cout << tekst;
}
Możemy również napisać własną funkcję ale myślę, że to jest to czego szukasz.
Więcej możesz poczytać tutaj:
http://cpp0x.pl/dokumentacja/standard-C++/reverse/331
https://www.techiedelight.com/reverse-an-array-cpp/