摘要: 各种排序算法源代码,各种排序算法性能比较:直接插入排序,希尔排序,冒泡排序,快速排序,简单选择排序,堆排序,二路归并排序,STL排序算法 阅读全文
posted @ 2010-08-30 21:51 张朝阳 阅读(1936) 评论(0) 推荐(0) 编辑
摘要: const学习大总结1.constinti=8;常量在定义后不能更改,所以定义时必须初始化2.const对象默认为头文件的局部变量非const变量默认为extern。要使const变量能够在其他文件中访问,必须显式地指定它为extern。//file_1.ccintcounter;//file_2.ccexternintcounter;++counter;--------------------------------//file_1.ccexternconstintbufSize=fcn();//file_2.ccexternconstintbufSize;if(i<bufSize)插 阅读全文
posted @ 2010-08-30 15:10 张朝阳 阅读(442) 评论(0) 推荐(0) 编辑