|
|
@ -58,7 +58,6 @@ int main()
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void init()
|
|
|
|
void init()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -94,7 +93,7 @@ void quit()
|
|
|
|
quit(); // 递归调用自己
|
|
|
|
quit(); // 递归调用自己
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
=======
|
|
|
|
|
|
|
|
// 查询图书信息
|
|
|
|
// 查询图书信息
|
|
|
|
void query_data()
|
|
|
|
void query_data()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -118,4 +117,20 @@ void query_data()
|
|
|
|
printf("没有找到编号为%d的图书!\n", id);
|
|
|
|
printf("没有找到编号为%d的图书!\n", id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
>>>>>>> abdd42ecb23a7d711b141a7e6ad1be4b1d53f56f
|
|
|
|
|
|
|
|
|
|
|
|
// 打印图书信息
|
|
|
|
|
|
|
|
void print_data()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
struct book *p;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p = books; // 从全局链表头开始
|
|
|
|
|
|
|
|
while(p != NULL)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("图书编号:%d\n", p->id);
|
|
|
|
|
|
|
|
printf("图书名称:%s\n", p->name);
|
|
|
|
|
|
|
|
printf("图书作者:%s\n", p->author);
|
|
|
|
|
|
|
|
printf("图书价格:%.2f\n", p->price);
|
|
|
|
|
|
|
|
printf("----------------------\n");
|
|
|
|
|
|
|
|
p = p->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|