list.h

来自「Nachos是个教学用的小型操作系统」· C头文件 代码 · 共 36 行

H
36
字号
// list.h //	Data structures to manage LISP-like lists.  //// Copyright (c) 1992,1993,1995 The Regents of the University of California.// All rights reserved.  See copyright.h for copyright notice and limitation // of liability and disclaimer of warranty provisions.#ifndef LIST_H#define LIST_H#include "copyright.h"class ListElement;// The following class defines a "list" -- a singly linked list of// list elements, each of which contains an integer.class List {  public:    List();			// initialize the list    ~List();			// de-allocate the list    void Prepend(int value); 	// Put item at the beginning of the list    int Remove(); 	 	// Take item off the front of the list    bool Empty();		// is the list empty?     void SelfTest();      private:    ListElement *first;  	// Head of the list, NULL if list is empty    ListElement *last;		// Last element of list};#endif // LIST_H

⌨️ 快捷键说明

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