AningEmpire

导航

统计

公告

2011年9月19日 #

内部链接与外部链接【转】

摘要: 《内部连接与外部连接》作者Blog:http://blog.csdn.net/SpitFire/在说内部连接与外部连接前,先说明一些概念。1.声明 一个声明将一个名称引入一个作用域; 在c++中,在一个作用域中重复一个声明是合法的 以下都是声明: int foo(int,int); //函数前置声明 typedef int Int;//typedef 声明 class bar;//类前置声明 extern int g_var; //外部引用声明 class bar;//类前置声明 typedef int Int;//typedef 声明 extern int g_var; //外部引用声明 f阅读全文

posted @ 2011-09-19 11:49 AningEmpire 阅读(17) 评论(0) 编辑

2010年12月29日 #

C++实现矩阵图的遍历·最小生成树(prim,kruskal)·最短路径(Dijkstra,floyd)

摘要: #include<iostream>#include <iomanip>#include <stack>#include <deque>#include <fstream>using namespace std;struct primnode{public:char begvex;char endvex;int lowcost;};struct adknode{ int dist;//最近距离char way[50];//顶点数组int nodenum;//经过的顶点数};class Mgraph//邻接矩阵储存结构{public:M阅读全文

posted @ 2010-12-29 22:36 AningEmpire 阅读(356) 评论(0) 编辑

2010年12月28日 #

C++ 实现求二叉树的深度及便利(递归与非递归算法)

摘要: #include <iostream>#include <deque>#include <stack>using namespace std;struct BSTNode{int data;BSTNode * LChild,* RChild;};class BST{private:BSTNode *T;public:~BST();BSTNode * GetRoot();void BSTCreate();void BSTInsert(BSTNode *);int BSTDepth(BSTNode *);//求树的深度 递归void Depth();//树的深度阅读全文

posted @ 2010-12-28 12:58 AningEmpire 阅读(572) 评论(0) 编辑

九种排序算法

摘要: #include<iostream>#include <iomanip>#include <string>#include<deque>using namespace std;const int MAXSIZE=20;class node {public:void operator =(node b);int key;char info;};void node::operator=(node b){key=b.key;info=b.info;}struct Sqlist{node data[MAXSIZE+1];int length;};clas阅读全文

posted @ 2010-12-28 09:20 AningEmpire 阅读(158) 评论(0) 编辑

仅列出标题