C++類中單鏈表的實現(頭插、尾插、頭刪、尾刪、指定位置插入、指定位置刪除、鏈表長度、清空鏈表、鏈表排序)

#include<iostream> using namespace std; class Node { public: Node():next(NULL){} Node(int n,Node *p = NULL):value(n),next(p){} int value; Node *next; }; class List { public: static int len;   //對鏈表的長度
相關文章
相關標籤/搜索