c08p428.txt
来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 24 行
TXT
24 行
// *********************************************************// Header file ListIterator.h.// Used in the iterator version of the ADT list.// *********************************************************#include "ListNode.h" // Definition of ListNode and // ListItemType; ListNode declares // ListIterator as a friend classclass ListIterator{public: ListIterator(List *container, ListNode *nodePtr); const ListItemType & operator*(); ListIterator operator++(); // prefix ++ bool operator==(const ListIterator& rhs) const; bool operator!=(const ListIterator& rhs) const; friend class List;private: const List *container; // ADT associated with iterator ListNode *cur; // current location in collection}; // end class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?