orion99 ha scritto:
In che senso? spiegati meglio
il compilatore mi da questi errori :
||=== Build: Debug in struttura (compiler: GNU GCC Compiler) ===|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c||In function 'main':|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|29|warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Wformat=]|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|29|warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Wformat=]|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|31|warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Wformat=]|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|31|warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Wformat=]|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|34|error: incompatible type for argument 1 of 'stampa'|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|16|note: expected 'struct data' but argument is of type 'struct data *'|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c||In function 'stampa':|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|40|error: subscripted value is neither array nor pointer nor vector|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|40|error: subscripted value is neither array nor pointer nor vector|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|40|error: subscripted value is neither array nor pointer nor vector|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|40|error: subscripted value is neither array nor pointer nor vector|
C:\Users\Francesco\Desktop\Studio\C\struttura\main.c|40|error: subscripted value is neither array nor pointer nor vector|
||=== Build failed: 6 error(s), 4 warning(s) (0 minute(s), 0 second(s)) ===|
la linea 40 e' la linea della funzione
Mi da errore qui :
stampa(nascita);
void stampa(struct data nascita)
{
printf("%s %s %d %d %d\n",nascita[0].dati[0].nome,nascita[0].dati[0].cognome,nascita[0].giorno,nascita[0].mese,nascita[0].anno);
}