摘要: c++ stl sort函数使用举例: 1 #include <iostream> 2 #include<vector> 3 #include<algorithm> 4 #include<functional> 5 6 using namespace std; 7 8 class MyClass 9 {10 public:11 MyClass(int a,int b):first(a),second(b){}12 int first;13 int second;14 bool operator <(const MyClass &m) 阅读全文
posted @ 2013-06-21 22:37 楠楠IT 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 二叉查找数的操作: 1 #include <iostream> 2 3 using namespace std; 4 5 typedef struct BitNode 6 { 7 int data; 8 struct BitNode *lChild,*rChild; 9 }BitNode; 10 11 int main() 12 { 13 void InitTree(BitNode *&BitTree); 14 int PrintTree(BitNode *BitTree); 15 int SearchNode(BitNode *... 阅读全文
posted @ 2013-06-21 09:40 楠楠IT 阅读(352) 评论(0) 推荐(0) 编辑