PTT
Submit
Submit
选择语言
正體中文
简体中文
PTT
C_and_CPP
[问题] c++将字串排序
楼主:
cchou0114
(嘻嘻)
2016-05-10 21:14:07
如题
我想要将字串排序
例如有3个字串
分别存在一个字串阵列中
string word[3];
word[0]="Hello";
word[1]="World";
word[2]="Bye";
要怎么把他的字首依照字典顺序排序呢
变成这样
word[0]="Bye";
word[1]="Hello";
word[2]="World";
求各位大大给个意见或提示
谢谢!
作者:
LPH66
(-6.2598534e+18f)
2016-05-10 21:20:00
你有试想过哪些方向? 有什么类似题你会做的?
作者:
chuegou
(chuegou)
2016-05-10 21:23:00
先用排序判断word移动前后的位置 并另外记录
作者:
bbuc
(C&C++完美经典)
2016-05-11 01:21:00
bubble sort啊 英字的ASCII是著顺序排的 给两个了
继续阅读
[问题] read only const char string
bjk
[问题] 输入的中文字转成Unicode
johnnyyushin
Re: [问题] uses of the keyword static
PkmX
[问题] 如何制造差异很大的乱数?
uioty
[问题] loop 终止写法
bjk
Re: [问题] uses of the keyword static
loveflames
[问题] uses of the keyword static
bjk
[问题] 如何学习Linux 驱动程式
qazkevin
Re: [问题] CUDA的核心与block分配问题
jun0325
[问题] Understand-4.0 V.S. Source insight
jba
Links
booklink
Contact Us: admin [ a t ] ucptt.com