64,654
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
string str1,str2;
str1="hello,world!";
// str2.assign(str1.rbegin(),str1.rend());
reverse(str1.begin(), str1.end());
cout<<str1<<endl;
return 0;
}