vc++中的错误,请大哥大姐指教,谢!

来源:互联网 发布:非负矩阵分解算法原理 编辑:程序博客网 时间:2024/06/10 06:10

这是我在其它网站看到的例子,#include<stdio.h>
#include<stdlib.h>
#include<time.h>

void guitu(void);

main()
{
srand(time(NULL));
guitu();
return 0;
}

void guitu()
{
int i,j,count=0,cou=0,number;
char printfun[71];

while(1) {
for(j=0;j<70;j++)
printfun[j]=' ';
printfun[71]='';

number=rand()%10+1;
printf("n");

if(1<=number && number<=5) {
count=count+3;
if(count>70) count=0;
printfun[count]='G';
}

if(6<=number && number<=7) {
count=count-6;
if(count<0) count=0;
printfun[count]='G';
}

if(8<=number && number<=10) {
count=count+1;
if(count>70) count=0;
printfun[count]='G';
}

if(1<=number && number<=2) {
cou=cou+0;
printfun[cou]='T';
}

if(3<=number && number<=4) {
cou=cou+9;
if(cou>70) cou=0;
printfun[cou]='T';
}

if(number==5) {
cou=cou-12;
if(cou<0) cou=0;
printfun[cou]='T';
}

if(6<=number && number<=8) {
cou=cou+1;
if(cou>70) cou=0;
printfun[cou]='T';
}

if(9<=number && number<=10) {
cou=cou-2;
if(cou<0) cou=0;
printfun[cou]='T';
}

if(count==cou)
printfun[count]='P';

printf("%s",printfun);
printf("nn");

if(count==70) {
printf("gui win!!!nn");
break;
}
if(cou==70) {
printf("tu win!!!nn");
break;
}
sleep(1);
}
}

这是C的例子,在VC++中出现了错误如下:

fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.

这是什么错误,请指点,谢!

原创粉丝点击