Mi son preso la briga di provare a compilare cio' che hai postato (aggiungendo la define gli include e la main):
Codice PHP:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NOME_GIOC 32
char NomeGioc(char giocatori[][MAX_NOME_GIOC], int j)
{
j = 0;
do {
printf("Giocatore %d inserisci il tuo nome (max %d caratteri)\n[S per uscire]: ", j + 1, MAX_NOME_GIOC);
scanf("%s", giocatori[j][MAX_NOME_GIOC - 1]);
fflush(stdin);
if(strcmp(giocatori[j], "S") == 0 || strcmp(giocatori[j], "s") == 0)
{
exit(0);
}
else if(size_t strLen(giocatori[j]) <= 0 || size_t strLen(giocatori[j]) > MAX_NOME_GIOC - 1)
{
printf("Nome piu' lungo del consentito!");
}
else if(!giocatori[j])
{
puts("Nome troppo breve!");
}
} while(j < numGiocatori);
}
int main (void){
return 0;
}
ottenendo:
codice:
$ gcc -Wall -ansi -pedantic main.c
main.c: In function 'NomeGioc':
main.c:13: warning: format '%s' expects type 'char *', but argument 2 has type 'int'
main.c:20: error: parse error before 'size_t'
main.c:27: warning: control reaches end of non-void function