看板 NTUEE107HW 關於我們 聯絡資訊
#include <iostream> #include <algorithm> #include <iterator> #include <string> using namespace std; int main() { string str; cin>>str; reverse_copy(str.begin(), str.end(), ostream_iterator<char>(cout)); return 0; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.223.18.49
yaochia:解釋依下吧 推 140.112.115.2 11/21
aknow:反過來複製(str的頭,到str的尾,貼到輸出) 推 61.223.18.49 11/21
sosovip:更加的迷惑...看不懂...|||| 差好多 推 140.112.240.51 11/21
timrau:充分發揮絕不重新發明輪子的精神啊! 推 210.85.10.126 11/21