Mega Code Archive
Categories
/
C++
/
String
Reversing an STL String
#include
#include
#include
using namespace std; int main () { string strSample ("Hello String! "); cout << strSample << endl; reverse (strSample.begin (), strSample.end ()); cout << strSample; return 0; }