这是因为在代码中使用的是system("clear")命令来清屏,而不同的操作系统可能使用不同的命令来实现清屏。在Windows系统下,可以尝试使用system("cls")命令来清屏。修改代码如下:

case 0:
    system("cls");
    break;

这样就可以在Windows系统下使用输入0来清屏了。

#include iostream#include map#include algorithmusing namespace std;struct Student string name; int score;;mapint Student students;void inputData int id; string name; int score;

原文地址: https://www.cveoy.top/t/topic/hOBq 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录