把字符串反转
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
int main(){
string s="abcdefg";
string k=string(s.rbegin(),s.rend());
cout<<k<<endl;
return 0;
}
把字符串反转
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
int main(){
string s="abcdefg";
string k=string(s.rbegin(),s.rend());
cout<<k<<endl;
return 0;
}