刚刚装的VC++6.0企业版 但运行出错
--------------------Configuration: Cpp2 - Win32 Debug--------------------
Compiling...
Error spawning cl.exe
Cpp2.exe - 1 error(s), 0 warning(s)
几个程序源代码都对了 这个错误什么意思呢
#include<stdio.h>
void main()
{
int y,m,d,leap,days;
printf("输入日期:年.月.日):");
scanf("%d.%d.%d",&y,&m,&d);
if((y%4==0 && y%100!=0) || (y%400==0))
leap=1;
else
leap=0;
days=d;
switch(m-1)
{
case 12:days+=31;
case 11:days+=30;
case 10:days+=31;
case 9:days+=30;
case 8:days+=31;
case 7:days+=31;
case 6:days+=30;
case 5:days+=31;
case 4:days+=30;
case 3:days+=31;
case 2:if(leap==1)/*闰年的情况*/
days+=29;
else
days+=28;
case 1:days+=31;
}
printf("\n%d.%d.%d是该年的第%d天\n\n",y,m,d,days);
}