void additionmenu()
{
char choice;
printf("Please select the level");
printf("A level 1");
printf("B level 2");
printf("C level 3");
scanf("%c", &choice);
if (choice == "A" || "a")
{
printf("You have selected level 1\n");
additionmenu();
}
else if (choice == "B" || "b")
{
printf("You have selected level 2\n");
subtractionmenu();
}
else if (choice == "C" || "c")
{
printf("You have selected level 3\n");
multiplicationmenu();
}
else
{
printf("Invalid choice\n");
}
错误发生在第58,63,68,84,96行
'==': 'int' differs in levels of indirection from 'char [2]'
'time' undefined; assuming extern returning int
illegal else without matching if
那些是错误......
有人可以帮助我解决问题 我必须开发一个数学测验程序 n有人可以告诉我如何为level1,2,3 创建一个子功能