1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <stdio.h> #include <stdlib.h> int main(void ) { int a; char *p; for (i=0; i<1000; i++) { p = malloc(10240); printf("hi %d\n", i); } return 0; }
1 2 3 4
In function 'main': Line 9: error: 'i' undeclared (first use in this function) Line 9: error: (Each undeclared identifier is reported only once Line 9: error: for each function it appears in.)