⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accountlist.h

📁 这是我们C++书上的课后题答案。是钱能编著的第二版C++
💻 H
字号:
#ifndef HEADER_ACCOUNTLIST
#define HEADER_ACCOUNTLIST
#include"Account.h"
//////////////////////////////////////////////////////////////////////////
class Node
{
public:
	Account &acnt;
	Node *next,*prev;
	Node(Account &a):acnt(a),next(0),prev(0)
	{

	}
	bool operator ==(const Node&n)const
	{
		return acnt ==n.acnt;
	}
protected:
private:
	
};
class AccountList
{
public:
	AccountList():first(0),size(0)
	{

	}
	Node*getFirst()const
	{
		return first;
	}
	int getsize()const
	{
		return size;
	}
	void add(Account &a);
	void remove(string acntNo);
	Account *find (string acntNo)const;
	bool isEmpty()const
	{
		return !size;
	}
	void display()const;
	~AccountList();
	

protected:
private:
	int size;
	Node *first;
};
#endif

⌨️ 快捷键说明

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