只是罗列代码,大家都看的懂
1
//Node.h
2
//By Hafeyang
3
//该程序实现一个节点类
4
//
5
//头文件部分
6
#include <string>
7
#include <iostream>
8
#define null 0
9
using namespace std;
10
11
//类Node的实现
12
class Node
13
2
3
4
5
6
7
8
9
10
11
12
13
1
//List .h
2
//By Hafeyang
3
//该类实现类链表
4
#include "Node.h"
5
class List
6
;
2
3
4
5
6
1
2
#include "List.h"
3
void main()
4
}
2
3
4