Ich schreibe einen Code ist über Black Jack. Ich kann es nicht kompilieren, es tritt Warnung auf. Multi-Zeichen-Zeichen Konstante und Überlauf in implizite konstante Konvertierung Kann mir jemand sagen, was los ist. Ich habe es für lange Zeit gedacht plz hilf mir.Multi-Zeichen-Zeichen-Konstante und Überlauf in implizite konstante Konvertierung
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int flower;
int k;
int add [13]={1,2,3,4,5,6,7,8,9,10,10,10,10};
char flower_all [4]={'\3','\4','\5','\6'};
char number_all [13]={'A','2','3','4','5','6','7','8','9','10','J','Q','K'};
char player_f[13],player_n[13];
char com_f[13],com_n[13];
int poker [52]={0};
int i,j,y,num,ans;
int player_p=0,com_p=0;
void wash(){
int k;
k=rand()%52;
while(poker[k]==1)
{
k=rand()%52;
}
poker[k]=1;
}
void give_card_p(){
char player_f[13],player_n[13];
int i,k;
int ans;
printf("請問是否要補牌? 1:要 2:不要");
scanf("%d",&ans);
fflush(stdin);
while (ans==1){
wash();
player_f[i]=flower_all[k/13];
player_n[i]=number_all[k%13];
player_p+=add[k%13];
continue;
if (player_p>21)
break;
}
}
int main(){
srand(time(0));
char player_f[13],player_n[13];
int k;
for(i=0;i<2;i++){
wash();
player_f[i]=flower_all[k/13];
player_n[i]=number_all[k%13];
player_p+=add[k%13];
}
for (i=0;i<2;i++){
wash();
com_f[i]=flower_all[k/13];
com_n[i]=number_all[k%13];
com_p+=add[k%13];
}
printf("%c%c",player_f[i],player_n[i]);
fflush(stdin);
return 0;
}
Bitte beachten Sie die Schaffung eines [MVCE] (http://stackoverflow.com/help/mcve). Bitte geben Sie auch den vollständigen Text aller Fehlermeldungen an und geben Sie an, in welcher Zeile ein Fehler auftritt. –