{
strcpy(arr[i][6],B);
strcpy(arr[i][14],H);
}
strcpy(arr[5][6],A);
strcpy(arr[5][14],G);
strcpy(arr[14][6],C);
strcpy(arr[14][14],M);
out(p);
while(1)
{
printf("黑子走,请输入行,列:");
scanf("%d,%d",&a,&b);
strcpy(arr[a+4][b+5],N);
out(p);
c=winner(a,b);
printf("c=%d",c);//.............
if(c==1000)
{
printf("黑子胜");
exit(0);
}
printf("白子走,请输入行,列:");
scanf("%d,%d",&a,&b);
strcpy(arr[a+4][b+5],I);
out(p);
c=winner(a+4,b+5);
printf("c=%d",c);//................
if(c==1000)
{
printf("黑子胜");
exit(0);
}
}
return 0;
}
这是全部代码
警告信息:23.c: In function ‘winner’:
23.c:35: warning: passing argument 2 of ‘strcmp’ makes pointer from integer without a cast
/usr/include/string.h:143: note: expected ‘const char *’ but argument is of type ‘int’