simplelist.h
来自「查看局域网的信息,类似网上邻居的功能,例如查看哪台计算机在线等」· C头文件 代码 · 共 48 行
H
48 行
#ifndef SIMPLELIST_H#define SIMPLELIST_H#include "mystring.h"template <class T>struct TemplNode{ TemplNode(const T& text) :m_item(text),m_next(0) {}; T m_item; TemplNode* m_next;};template <class T>class SimpleList{ public: SimpleList(); ~SimpleList(); void append(const T& item); void clear(); int size(); T* first(); T* next(); void removeFirst(); void remove(T* item); protected: TemplNode<T>* m_list; TemplNode<T>* m_current; TemplNode<T>* m_last; int m_size;};#include "tcpnode.h"#include "client.h"#include "mapentry.h"template class SimpleList<int>;template class SimpleList<MyString>;template class SimpleList<Node>;template class SimpleList<Client>;template class SimpleList<MapEntry>;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?