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

📄 db.h

📁 C++ class and storage
💻 H
字号:
#ifndef _DB_H#define _DB_H#include "Record.h"#define MAX_NUM_OF_STUDENTS 1000class DB {private:	Record *_arrayDB[MAX_NUM_OF_STUDENTS];	int _next_index;public:	// the default constructor, creates an empty database. 	DB();	// the destructor, deletes all the records in the database.	~DB();	// inserts the record pointed to by newRecord into the database.         // If a record with the same  number as newRecord's exists         // in the database, it returns false. Otherwise, it returns true.  	// If database is full, it silently fails.	bool insert(Record *newRecord); 	// searches the database for a record with Num, 	// if the record is found, its content will be copied to 	// the searchRecord, and the method returns true. Otherwise	// the method returns false.	bool retrieve(unsigned int Num, Record * & searchRecord);	// deletes the record with Num from the database. If 	// the record was indeed in the database, it returns true.	// Returns false otherwise.	bool remove(unsigned int Num);	// deletes all the records in the database.	void clear();	// returns true if there is no record in the database, otherwise,	// it returns false.	bool isEmpty();	// returns true if the database is full, i.e. no further 	// records can be inserted into the database, otherwise, it returns	// false.	bool isFull(); 	// dumps the content of the database to the standard output (using 	// the "print" method of the Record class), sorted in ascending	// order of  numbers, separated by empty lines. 	void dump();}; //DB#endif 

⌨️ 快捷键说明

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