Ancora dei problemi nella programmazione. Questa volta riguarda i puntatori.
codice:
#include <stdio.h>
#include <stdlib.h>
int main (){
int a = 3, b = c = 0, *p = NULL;
b = 2 * (a + 5);
p = &a;
c = 2 * (*p + 5);
printf("\n a = %d", a);
printf("\n b = %d c = %d\n", b, c);
return 0;
}
il gcc da il seguente errore:
Puntatori1.c: In function ‘main’:
Puntatori1.c:4: error: ‘c’ undeclared (first use in this function)
Puntatori1.c:4: error: (Each undeclared identifier is reported only once
Puntatori1.c:4: error: for each function it appears in.)
ma non l'ho dichiarato con b = c = 0?