摘要: 使用STL库sort函数对vector进行排序,vector的内容为对象的指针,而不是对象。代码如下 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 class Elm 8 { 9 public:10 ... 阅读全文
posted @ 2014-11-21 11:16 fengbohello 阅读(1313) 评论(0) 推荐(0) 编辑
摘要: C++标准快速排序库qsort进行结构体快速排序代码如下 1 #include 2 #include 3 typedef struct 4 { 5 int date; 6 int value; 7 }X_S; 8 9 /* a->z */10 int cmpfunA2Z(con... 阅读全文
posted @ 2014-11-21 10:17 fengbohello 阅读(6497) 评论(0) 推荐(0) 编辑