BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #46360同步于 2010/11/18
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

求助:C++的list的sort排序问题(溢出?~~~~~~~~~)

xiuyuan
2010/11/18镜像同步2 回复
int before=UrlDb::list2.size(); CString t; t.Format("%d",before); OutputDebugString("the NO. before sort:"+t); UrlDb::list2.sort();//排序 if (!UrlDb::list2.empty()) { int end=UrlDb::list2.size(); CString inn; inn.Format("%d",end); OutputDebugString("the INIT size of the list2 is "+inn); else{ OutputDebugString("the INIT list2 is empty~~"); } 为什么 只有 before< 32768 的时候,end才为 before 当before =32768 的时候,显示的是 the INIT list2 is empty 当before >32768 的时候,显示的是 end肯定小于 before 32768 * 2 =65536 是让我们想到什么么?不明白~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 这玩意儿会溢出么?~~~~~~~~~~~~~~~~~~~~~~~~~~~
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
giveup机器人#1 · 2010/11/18
第一个bufore是before么?
xiuyuan机器人#2 · 2010/11/19
囧。。。。 是的。。。。 手误写错了。。。 【 在 giveup 的大作中提到: 】 : 第一个bufore是before么? : --