📄 llist.h
字号:
class list { // Linked list class
private:
link* head; // Pointer to list header
link* tail; // Pointer to last ELEM in list
link* curr; // Position of "current" ELEM
public:
list(const int =LIST_SIZE); // Constructor
~list(); // Destructor
void clear(); // Remove all ELEMs from list
void insert(const ELEM&); // Insert ELEM at current position
void append(const ELEM&); // Insert ELEM at tail of list
ELEM remove(); // Remove and return current ELEM
void setFirst(); // Set curr to first position
void next(); // Move curr to next position
void prev(); // Move curr to previous position
int length() const; // Return current length of list
void setPos(const int); // Set curr to specified position
void setValue(const ELEM&); // Set current ELEM's value
ELEM currValue() const; // Return current ELEM's value
bool isEmpty() const; // Return TRUE if list is empty
bool isInList() const; // TRUE if curr is within list
bool find(const ELEM&); // Find value (from current position)
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -