摘要:
#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... 阅读全文
摘要:
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... 阅读全文