Hi, i can’t risolve this problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hi, i can’t risolve this problem

int distanza(char *pA,int base,int altezza, int npedine, char lettera, int *l, struct punteggio *ap){ int i=0,j=0; int k=0; int a=0; int d=2147483647; if(pA[i*SO_BASE+j]==lettera){ k=0; for(k=0; k<l /*here */; k++){ a=abs(i-ap[k].posizione_Al)+abs(j-ap[k].posizione_Ba); if(a<d){ d=a; } } } return d; } where i wrote /*here*/ the compiler made this warning: Giocatore.c: In function ‘distanza’: Giocatore.c:34:13: warning: comparison between pointer and integer for(k=0; k<l; k++){

11th Jan 2020, 10:52 AM
Sofia Amaolo
Sofia Amaolo - avatar
0 Answers