摘要: #define MAX_SIZE 20class Stack {private: int count; int capacity; int data[MAX_SIZE];public: Stack(); ~Stack(); void push(const int& value); int top() const; void pop(); int size() const; bool full() const; bool empty() const; void clear();};Stack::Stack() : co... 阅读全文
posted @ 2013-09-08 19:43 StrikeW 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 struct Node { 2 int data; 3 Node* next; 4 Node(int d, Node* n = NULL) 5 : data(d),next(n) { 6 7 } 8 }; 9 10 class List { 11 public: 12 List(); 13 ~List(); 14 void clear(); 15 bool empty() const; 16 void push_back(const int& value); 17 voi... 阅读全文
posted @ 2013-09-08 13:10 StrikeW 阅读(266) 评论(0) 推荐(0) 编辑