fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main() {
  7. wstring input = L"我的名字是小明";
  8. wstring result;
  9. std::copy(input.rbegin(), input.rend(), back_inserter(result));
  10. wcout << input << endl;
  11. wcout << result << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3288KB
stdin
Standard input is empty
stdout
???????
???????