reversing a string in C++

C++ string does not have reverse member function,
this is how we can do it:
string s("abcdef");
reverse(s.begin(), s.end());

No comments: