From 7fa09e96eb3cee9d53e9be39c1d56ab6c3eca47f Mon Sep 17 00:00:00 2001 From: yangtengze Date: Fri, 21 Apr 2023 23:08:21 +0800 Subject: [PATCH] change 1 --- data.h | 6 ++++++ title.cpp | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data.h b/data.h index 5f19df2..0955567 100644 --- a/data.h +++ b/data.h @@ -28,26 +28,32 @@ void DoBoorowBook(); // 借用图书 void repaid_book(void) // 还书 { printf("还书\n"); + DoRepaidBook(); } void boorow_book(void) // 借书 { printf("借书\n"); + DoBoorowBook(); } void query_book(void) // 查询 { printf("查书\n"); + DoFindBook(); } void print_book(void) // 打印 { printf("打印\n"); + DoPrintBook(); } void add_book(void) // 添加 { puts("添加"); + DoAddBook(); } void delete_book(void) // 删除 { puts("删除"); + DoDeleteBook(); } diff --git a/title.cpp b/title.cpp index f501052..0e3f6d7 100644 --- a/title.cpp +++ b/title.cpp @@ -41,27 +41,21 @@ switch(c) { case CMD_REPAID:// 还书 {repaid_book(); - DoRepaidBook(); break;} case CMD_BOOROW:// 借书 {boorow_book(); - DoBoorowBook(); break;} case CMD_PRINT:// 打印所有书籍 {print_book(); - DoPrintBook(); break;} case CMD_QUERY:// 查找书籍 {query_book(); - DoFindBook(); break;} case CMD_INSERT:// 添加书籍 {add_book(); - DoAddBook(); break;} case CMD_DELETE:// 删除书籍 {delete_book(); - DoDeleteBook(); break;} case CMD_QUIT:// 退出程序 {if (confirm("确定要退出吗?")) quit(); // 仅在确认后退出