sciter.h
来自「数据结构c++语言描述 Borland C++实现」· C头文件 代码 · 共 28 行
H
28 行
// simulated chain iterator
#ifndef SimChainIterator_
#define SimChainIterator_
template<class T>
class SimChainIterator {
public:
T* Initialize(const SimChain<T>& c)
{location = c.first;
S = &c.S;
if (location == -1) return 0;
return &S->node[location].data;
}
T* Next()
{if (location == -1) return 0;
location = S->node[location].link;
if (location == -1) return 0;
return &S->node[location].data;
}
private:
SimSpace<T> *S; // pointer to simulated space for chain
int location; // node index in simulated space
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?