请问这是什么意思?

#include<stdio.h>

int main(void)

{

double a;

printf("请输入你的成绩:");

scanf("%lf",a);

switch (a/10) {


case 10:

{

printf("你的成绩是:A");

}

break;

case 9:

{

printf("你的成绩是:B");

}

break;

case 8:

{

printf("你的成绩是:C");

}

break;

case 7:

{

printf("你的成绩是:D");

}

break;

case 6:

{

printf("你的成绩是:E");

}

break;

default:

{printf("请重新输入:");

}

}

}


C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin\7.c(7) : error C2050: switch expression not integral

Error executing cl.exe.


站台指标人
浏览 1085回答 0
0回答

戈德夫

应该是是已经有个cl.exe执行,还没退出,再要编译执行,就会出现这样。解决方法:1. 打开vc界面,点击VC“TOOLS(工具)”;2. 然后点击“Option(选择)” ;3. 点击“Directories(目录)”;4. 重新设置“Excutable Fils、Include Files、 Library Files、Source Files”的路径。如果你是按照初始路径安装vc6.0的,路径应为:executatble files:C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin    C:\Program Files\Microsoft Visual Studio\VC98\BINC:\Program Files\Microsoft Visual Studio\Common\TOOLSC:\Program Files\Microsoft Visual Studio\Common\TOOLS\WINNTinclude files:C:\Program Files\Microsoft Visual Studio\VC98\INCLUDEC:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDEC:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDElibrary files:C:\Program Files\Microsoft Visual Studio\VC98\LIBC:\Program Files\Microsoft Visual Studio\VC98\MFC\LIBsource files:C:\Program Files\Microsoft Visual Studio\VC98\MFC\SRCC:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDEC:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDEC:\Program Files\Microsoft Visual Studio\VC98\CRT\SRC
打开App,查看更多内容
随时随地看视频慕课网APP