[問題] c++將字串排序
如題
我想要將字串排序
例如有3個字串
分別存在一個字串陣列中
string word[3];
word[0]="Hello";
word[1]="World";
word[2]="Bye";
要怎麼把他的字首依照字典順序排序呢
變成這樣
word[0]="Bye";
word[1]="Hello";
word[2]="World";
求各位大大給個意見或提示
謝謝!
--
Sent from my Android
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.73.78.251
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1462886050.A.0C4.html
※ 編輯: cchou0114 (42.73.78.251), 05/10/2016 21:16:57
※ 編輯: cchou0114 (42.73.78.251), 05/10/2016 21:20:06
推
05/10 21:20, , 1F
05/10 21:20, 1F
推
05/10 21:23, , 2F
05/10 21:23, 2F
推
05/11 01:21, , 3F
05/11 01:21, 3F
討論串 (同標題文章)