上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 39 下一页
摘要: 【问题描述】 树是一种大家都不陌生的数据结构,它有可能是一颗空树或是一些满足要求的节点连接而成的有向边的集合。 一棵树只有一个根节点,根节点没有指向它的边。 除了根节点的每一个节点都只有一条边指向它。 出现环的图都不是树。 对一些节点连接而成的有向边的集合进行判定,判定每一组的输入数据构成的图是... 阅读全文
posted @ 2015-04-10 16:28 _tham 阅读(612) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; //表结点 typedef struct ArcNode{ int adjvex;//该弧所指向的顶点的位置 ArcNode *nextarc; }ArcN... 阅读全文
posted @ 2015-04-10 16:21 _tham 阅读(807) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; typedef struct MGraph{ string vexs[10];//顶点信息 int arcs[10][10];//邻接矩阵 int vexnum, arcnu... 阅读全文
posted @ 2015-04-10 16:18 _tham 阅读(307) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; #define INFINITY 65535//无边时的权值 #define MAX_VERTEX_NUM 10//最大顶点数 typedef struct MGraph{ ... 阅读全文
posted @ 2015-04-10 16:09 _tham 阅读(604) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; #define INFINITY 65535 #define MAX_VERTEX_NUM 10 typedef struct MGraph{ string vex... 阅读全文
posted @ 2015-04-10 15:59 _tham 阅读(638) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; template void Perm(T a[], int k, int m) { if(k==m) { for(int i=0; i<=m; i++) c... 阅读全文
posted @ 2015-04-10 15:44 _tham 阅读(291) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; typedef struct MGraph{ string vexs[10];//顶点向量 in... 阅读全文
posted @ 2015-04-10 15:35 _tham 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 前言 你是否觉得自己从学校毕业的时候只做过小玩具一样的程序?走入职场后哪怕没有什么经验也可以把以下这些课外练习走一遍(朋友的抱怨:学校课程总是从理论出发,作业项目都看不出有什么实际作用,不如从工作中的需求出发) 建议: 不要乱买书,不要乱追新技术新名词,基础的东西经过很长时间积累而且还会在未来... 阅读全文
posted @ 2015-04-08 20:51 _tham 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1、为什么构造函数不能是虚函数? 因为:从使用上来说,虚函数是通过基类指针或引用来调用派生类的成员的,则在调用之前,对象必须存在,而构造函数是为了创建对象的。 2、为什么在派生类中的析构函数常常为虚析构函数 注意,默认不是析构函数 一句话,是为了避免内存泄露 如果不考虑虚函数的状况,给出一个基... 阅读全文
posted @ 2015-03-30 22:53 _tham 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 转载来自:CSDNinsistGoGo (http://blog.csdn.net/insistgogo/article/details/6655077) 引用的应用: 常引用: 语法: [cpp] view plaincopy const 类型 &引用名=目标变量名; 作用... 阅读全文
posted @ 2015-03-30 22:51 _tham 阅读(150) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 39 下一页