摘要:
1 #ifndef LIST_H 2 #define LIST_H 3 #include <iostream> 4 template <class Type> class List;//List类的前置声明,因为在友元类中要用到 5 6 7 template<class Type> 8 class ListNode 9 { 10 friend class List<Type>; 11 private: 12 13 Type data;//存放的数据 14 ListNode *link;//指向下一个数据的指针 15 ListNo... 阅读全文