listnode.h

来自「字符频度统计」· C头文件 代码 · 共 31 行

H
31
字号
#ifndef LISTNODE_CLASS
#define LISTNODE_CLASS

#include <iostream.h>
#include <stdlib.h>
#include <fstream.h>
#include <iomanip.h>

template <class T>
class LinkedList;

template <class T>
class Iterator;

template <class T>
class ListNode
{
	friend class LinkedList<T>;
	friend class Iterator<T>;
public:
	ListNode():link(NULL){};
	ListNode(const T & item,ListNode<T> *next=NULL):data(item),link(next){}
	ListNode<T> *GetNextNode(){return link;}
	friend ostream & operator<<(ostream & os,const ListNode<T> &node);
	T data;
private:
	
	ListNode<T> *link;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?