上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: #include "stdafx.h"#include <iostream>#include <fstream>#include <Windows.h>using namespace std;#define INFINITY 65535#define MAX_VERTEX_NUM 20 //顶点最多个数#define LENGTH 5 //顶点字符长度//*********************************邻接表***********************************begintypedef char Vert 阅读全文
posted @ 2012-08-20 19:14 venow 阅读(367) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <fstream>#include <Windows.h>#include <algorithm>using namespace std;#define INFINITY INT_MAX#define MAX_VERTEX_NUM 20 //顶点最多个数#define LENGTH 5 //顶点字符长度//********************************Kruskal(并查集实现)******************* 阅读全文
posted @ 2012-08-18 10:03 venow 阅读(1384) 评论(0) 推荐(2) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <fstream>#include <queue>#include <stack>#include <Windows.h>using namespace std;#define INFINITY INT_MAX#define MAX_VERTEX_NUM 20 //顶点最多个数#define LENGTH 5 //顶点字符长度//邻接矩阵typedef struct _Graph{ int matrix[MAX_VERTE 阅读全文
posted @ 2012-08-18 09:53 venow 阅读(2098) 评论(0) 推荐(1) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <fstream>#include <queue>#include <Windows.h>using namespace std;#define INFINITY INT_MAX#define MAX_VERTEX_NUM 20 //顶点最多个数#define LENGTH 5 //顶点字符长度//邻接矩阵typedef struct _Graph{ int matrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM] 阅读全文
posted @ 2012-08-18 09:47 venow 阅读(1637) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <Windows.h>using namespace std;typedef struct _Node{ int data; struct _Node *left; struct _Node *right; bool isRed; //红黑树 _Node() { data = 0; left = NULL; right = NULL; isRed = true; }}Node, *_PN... 阅读全文
posted @ 2012-08-15 21:46 venow 阅读(665) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <fstream>#include <queue>#include <Windows.h>using namespace std;#define INFINITY INT_MAX#define MAX_VERTEX_NUM 20 //顶点最多个数#define LENGTH 5 //顶点字符长度//*********************************邻接表********************************* 阅读全文
posted @ 2012-08-14 21:56 venow 阅读(2850) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <fstream>#include <queue>#include <Windows.h>using namespace std;#define INFINITY INT_MAX#define MAX_VERTEX_NUM 20 //顶点最多个数#define LENGTH 5 //顶点字符长度//邻接矩阵typedef struct _Graph{ int matrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM] 阅读全文
posted @ 2012-08-14 20:16 venow 阅读(3790) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <iomanip>#include <stack>#include <queue>#include <Windows.h>using namespace std;typedef struct _Node{ int data; struct _Node *left; struct _Node *right; int bf; //平衡因子 _Node() { data = 0; left = NULL; ... 阅读全文
posted @ 2012-08-09 20:10 venow 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 一般我们说虚函数,它的访问级别都是public的,用类对象可以直接调用,这样就可以实现运行时的类型绑定,那如果我们将虚函数私有化会出现什么情况呢?我们先来看一个非虚函数私有化的例子class Base{private: void PrintClassName () { cout<<"Base"<<endl; }public: void print() { PrintClassName(); }};class Derived : public Base{private: void PrintClassName() { ... 阅读全文
posted @ 2012-08-08 21:55 venow 阅读(7565) 评论(3) 推荐(3) 编辑
摘要: #include "stdafx.h"#include <iostream>#include <iomanip>#include <stack>#include <queue>#include <Windows.h>using namespace std;enum TYPE{ TYPE_LINK = 0, TYPE_CLUES,};typedef struct _Node{ int data; struct _Node *left; struct _Node *right; bool isVisit; //用于后序 阅读全文
posted @ 2012-08-07 20:47 venow 阅读(352) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页