复习(数据结构:c++)
LandscapeMi
这个作者很懒,什么都没留下…
展开
-
复习(数据结构):线性表 : c++_标准写法
1. 设计数据结构接口这里写代码片原创 2016-07-08 17:57:01 · 573 阅读 · 0 评论 -
复习(数据结构):动态数组:c++_常规写法
1. 异常类//内存异常//内存异常#includeclass BadInitializers { public: BadInitializers() {}};// insufficient memoryclass NoMem { public: NoMem() {}};//new引发Nomen的异常,而不是xallocvoid my原创 2016-07-10 13:31:41 · 352 阅读 · 0 评论 -
复习(数据结构):动态数组:c++_stl写法
定义异常//"dsexceptions.h"#ifndef DS_EXCEPTIONS_H#define DS_EXCEPTIONS_Hclass UnderflowException { };class IllegalArgumentException { };class ArrayIndexOutOfBoundsException { };class IteratorOutOfBou原创 2016-07-11 17:21:19 · 386 阅读 · 0 评论 -
复习(数据结构):链表:c++:stl
1. 类框架#include <stdio.h>#include <stdlib.h>#include <iostream>#include <queue>using namespace std;template<typename object>class List{private: struct Node{ };public: class const_ite原创 2016-07-18 10:52:54 · 295 阅读 · 0 评论 -
复习(数据结构):链表:c++:标准
1 . 数据结构Chain<T>是ChainNode<T>的友类,所以Chain<T>可以访问ChainNode<T>的所有成员(私有或公有)Chain<T>是ChainNode<T>的友类,所以Chain<T>可以访问ChainNode<T>的所有成员(私有或公有)#include<iostream>#include<vector>#include<cmath>#include<algo原创 2016-07-17 13:28:58 · 288 阅读 · 0 评论