code.club's Archiver
論壇
›
C/C++
› 將字串倒過來
enter
發表於 2019-4-16 18:27:26
將字串倒過來
#include <bits/stdc++.h>
using namespace std;
int main()
{
string str = "abcde";
// Reverse str
reverse(str.begin(), str.end());
cout << str;
return 0;
}
頁:
[1]
查看完整版本:
將字串倒過來