⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keychain.h

📁 数据结构c++语言描述 Borland C++实现
💻 H
字号:

#ifndef KeyedChain_
#define KeyedChain_
// file keychain.h

#include "echain.h"

template<class type>
class KeyedChain : public Chain<type>
{
public:
   int Delete(type& x); // delete x
   ChainNode<type> * First() {return first;}
};

template<class type>
int KeyedChain<type>::Delete(type& x)
{
ChainNode<type> *i = first, *p = 0;
for (; i && i->data != x; p = i, i = i->link);
if (i) {
        if (p) p->link = i->link;
        else first = i->link;
        delete i;
        return 1;}
return 0;
}
#endif

⌨️ 快捷键说明

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