C++反转字符串 1、reverse() 2、双指针方法 3、字符串拼接 1、reverse() #include <algorithm> #include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; reverse(s.begin(), s.end()); cout << s; return 0;