运行后输入数据回车后无反应

#include <iostream>

#include <stdlib.h>

#include <stdio.h> 

#include <iomanip>

#include <string> 

 

using namespace std;

#include"system.h"

int main()

{

int ISBN=0;

string name;

string author;

string classic;

string publicor;

string publicTime;

double bookPrice=0;

int number=0;

int choice=0;

BookSystem book;

while(true)

{

book.showMenu();

cout<<"请输入操作[0-7]"<<endl;

cin>>choice;

switch(choice)

{

case1:

book.addBook(ISBN,name,author,classic,publicor,publicTime,bookPrice,number);

break;

case2:

book.changeBook();

break;

case3:

book.delBook();

break;

case4:

book.searchBook();

break;

case5:

book.displayBook();

break;

case6:

book.delAllBook();

break;

case7:

book.sortBook();

break;

case8:

cout<<"欢迎下次使用"<<endl;

system("pause");

exit(0);

break;

default:

    system("cls");

break; 

}

}

delete[] bookArray;

system("pause");

return 0;

}

如果看不到效果,你加点打印信息,把choice打印一下,以及switch里面打印一些信息。

您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps: 问答会员年卡【8折】购 ,限时加赠IT实体书,即可 享受50次 有问必答服务,了解详情>>>https://t.csdnimg.cn/RW5m