返回信息流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 是让我们想到什么么?不明白~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这玩意儿会溢出么?~~~~~~~~~~~~~~~~~~~~~~~~~~~
这是一条镜像帖。来源:北邮人论坛 / cpp / #46360同步于 2010/11/18
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖
求助:C++的list的sort排序问题(溢出?~~~~~~~~~)
xiuyuan
2010/11/18镜像同步2 回复
订阅后,新回复会通过你的通知中心匿名送达。