Code:
#include <iostream>
#include <string>
#include <algorithm>
int main()
{
std::string s("APPLE");
std::reverse(s.begin(), s.end());
std::cout << s << "\n";
return 0;
}
"The C++ Standard Library A Tutorial and Reference" by Nicolai M. Josuttis. Probably one of the most useful C++ books in my collection.
If you find youself without the book handy, a good web reference is
http://www.sgi.com/tech/stl/.