我就在这慢慢写吧。一天写一点。先是简单图书馆:
书、证件、借、还
---------------------------------------------------
typedef struct book{
int id;
int state;
// 1 on ;
0 off; -1 lost;
struct book *next;
}BOOK;
typedef struct license{
int id;
int holding;
// the number it borrowed;
struct license *next;
}LICENSE;
typedef struct brecord{
int bookid;
int licenseid;
time_t btime;
struct brecord *next;
}BRECORD;
typedef struct rrecord{
int bookid;
int licenseid;
time_t rtime;
struct rrecord *next;
}RRECORD;
-------------------------------------------------
将要加的函数有
int newbook(BOOK *booklist) : sucess 1 || failure 0;
int deletebook(BOOK *booklist):sucess 1 || failure 0;
int newlicense(LICENSE *licenselist): sucess 1 || failure 0;
int deletelicense(LICENSE *licenselist):sucess 1 || failure 0;
int newborrow(BRECORD *blist):
sucess 1 || failure 0;
int newreturn(RRECORD *rlist): sucess 1 || failure 0;