随笔分类 -  数据结构

摘要:assert宏的原型定义在< assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义: #include < assert.h> void assert( int expression ); C++ assert()函数的作用是现计算表达式 expression ,如果其值为假 阅读全文
posted @ 2016-09-06 14:49 笨蛋敏 阅读(172) 评论(0) 推荐(0)
摘要:#include using namespace std; #define UNVISTITED 0 //表示没有被访问过 #define VISITED 1 //表示被访问过 //图类 class Graph { private: int numVertex, numEdge;//点的数目和边的数目 int **matrix;//邻接矩阵 int *mark; pu... 阅读全文
posted @ 2016-09-06 14:30 笨蛋敏 阅读(1283) 评论(0) 推荐(0)