You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.3 KiB

#include <iostream>
#include "MangerBook.h"
using namespace std;
int main()
{
MangerBook gm;// ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա
int select;//<2F>û<EFBFBD>ѡ<EFBFBD><D1A1>
while (true)
{
gm.ShowMenu();
cout << "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ҫִ<EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD>" << endl;
while (true)
{
cin >> select;
if (!cin) {
cout << "ERROR!" << endl;
cin.clear();
select = 1024;
cin.get();
}
if (select >= EXIT || select <= OTHERS) {
break;
}
else {
cout << "ָ<EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" << endl;
system("system");
gm.ShowMenu();
cout << "<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ҫִ<EFBFBD>еIJ<EFBFBD><EFBFBD><EFBFBD>" << endl;
}
}
switch (select)
{
case EXIT: gm.Exit_Sys(); break;
case LOANRANKING: gm.LoanRanking(); break;
case ADDBOOK: gm.AddBook(); break;
case SEARCHBOOK:gm.SearchBook(); break;
case SELECTBOOK:gm.SelectBook(); break;
case LOANBOOK:gm.LoanBook(); break;
case RETURNBOOK:gm.ReturnkBook(); break;
case SHOWBOOK:gm.ShowBook(); break;
default:system("cls"); break;
}
}
return 0;
}