资源介绍
C++链表类 模板类
#include
#include
#include "LinkedList.h"
using namespace std;
template
Node *LinkedList::GetNode(const T& item, Node* ptrNext) //生成新结点
{
Node *p;
p = new Node(item,ptrNext);
if (p == NULL)
{
cout << "Memory allocation failure!\n";
exit(1);
}
return p;
}
................