📄 inditer.h
字号:
// indirect list iterator
#ifndef IndirectListIterator_
#define IndirectListIterator_
template<class T>
class IndirectListIterator {
public:
T* Initialize(const IndirectList<T>& c)
{if (c.length > 0) {// nonempty list
length = c.length;
table = c.table;
location = 0;
return table[0];
}
// empty list
location = 0;
return 0;}
T* Next()
{if (location >= length) return 0;
location++;
return table[location];}
private:
int location; // current position in list
int length; // list length
T **table; // array of pointers
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -