string reverse in c++ stll code example
Example: string reverse stl
int main() {
string str = "foobarbaz";
reverse(str.begin(), str.end());
cout << str; // prints "zabraboof"
return 0;
}
int main() {
string str = "foobarbaz";
reverse(str.begin(), str.end());
cout << str; // prints "zabraboof"
return 0;
}