2012年5月29日

摘要: 抽象数据类型LinearList { //实例 0或多个元素的有序集合 //操作 Create (): 创建一个空线性表 Destroy (): 删除表 IsEmpty(): 如果表为空则返回t r u e,否则返回false Length (): 返回... 阅读全文
posted @ 2012-05-29 22:03 Buttonwood 阅读(215) 评论(0) 推荐(0) 编辑
 
摘要: #include except.hfloat *x;try {x = new float [n];}catch (xalloc) { // 仅当new 失败时才会进入 #include except.h cerr << "Out of Memory" << endl; exit( 1 ) ; }template <class T>void Make2DArray( T ** &x, int rows, int cols){ // 创建一个二维数组 // 不捕获异常 //创建行指针 x = new T * [rows]; //为每一 阅读全文
posted @ 2012-05-29 21:05 Buttonwood 阅读(1193) 评论(0) 推荐(0) 编辑