摘要: /* 注意C++ 的内存管理的复杂性 尤其是在merge() 之中,当融合之后如何保证被合并了的链表之后的对象的析构函数会出错,不会被delete两次 还有就是友元函数的模板写法*/#include <iostream>#include <typeinfo>using namespace std;template<class DataType>struct Node{ DataType data; Node<DataType> *next;};template<class DataType>class Linklist;templat 阅读全文
posted @ 2012-08-20 21:06 KingsLanding 阅读(738) 评论(0) 推荐(0) 编辑