code.club
標題:
將字串倒過來
[打印本頁]
作者:
enter
時間:
2019-4-16 18:27
標題:
將字串倒過來
#include <bits/stdc++.h>
using namespace std;
int main()
{
string str = "abcde";
// Reverse str[beign..end]
reverse(str.begin(), str.end());
cout << str;
return 0;
}
歡迎光臨 code.club (https://code.club/)
Powered by Discuz! X3.2