Hacker News new | ask | show | jobs
by yngccc 4659 days ago
that is little verbose, you can save a whole 7 characters.

  reverse(begin(str), end(str));
1 comments

also you will need #include <algorithm>