正在加载图片...
6:29:3 例:链表类 //LinkList. h class linklist //LinkList. cpp private: /1.处省略其它函数定义 struct NODE char ch inkList::- LinkListo i struct NODE *next, )*head; NODE *pWork; while(head!=NULL) public LinkListo pWork=head; LinkList o head=head→>next boo1 Insert(int, char) boo1 Delete(int) delete pWork boo1 Deletechar) void Display o16:29:32 例:链表类 //LinkList.h class LinkList{ private: struct NODE{ char ch; struct NODE *next; }*head; public: LinkList(); ~LinkList(); bool Insert(int,char); bool Delete(int); bool Delete(char); void Display(); }; //LinkList.cpp //…此处省略其它函数定义 LinkList::~LinkList(){ NODE *pWork; while(head!=NULL) { pWork=head; head=head->next; delete pWork; } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有