四.You selected Modelsim-Altera as Simulation Software in EDA Tool Settings,however…… You selected ModelSim-Altera as Simulation Software in EDA Tool Settings,however NativeLink found ModelSim in the pata – correct path or change EDA Tool Settings and
int i = 0; while (flag) { printf("please input a number >>> "); scanf("%d", &i);//输入一个字符或字符串的时候死循环 printf("%d\n", i); } 以上直接返回一串0........死循环 当scanf输入类型不匹配的时候,返回一个0值,但是之前输入的字符仍旧在缓冲区里面,所以解决方式也比较容易,在代码中加入ffl