定义一个图书类和一个书库类。图书类包括图书编号、书名、作者(只考虑第一作者)、定价等属性;书库类包括一个指向图书链表的头指针以及操作链表的相关函数。这两个类的定义如下:
class Book
{
int BookNumber; //图书编号
char BookName[50]; //书名
char AuthorName[30]; //第一作者姓名
double Price; //定价
Book *next; //<
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.000974s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.080389s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.001028s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001150s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.000890s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003034s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.000791s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.003593s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.014675s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.001061s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 254160 [ RunTime:0.036939s ]