Hi, I'm not sure why this isn't working. I define SIZE at the beginning but it seems not to work. I replaced SIZE with a different number and it worked fine. Why isn't it recognizing what SIZE is?
#include <stdio.h>
#define SIZE 10;
main()
{
int i, array[SIZE];
for(i = 0; i < SIZE; i++)
{
array[i] = 0
}
}
Errors I get:
C:\Users\Gary\Desktop\c\firstproga.c||In function 'main':|
C:\Users\Gary\Desktop\c\firstproga.c|7|error: expected ']' before ';' token|
C:\Users\Gary\Desktop\c\firstproga.c|8|error: expected expression before ';' token|
C:\Users\Gary\Desktop\c\firstproga.c|10|error: 'array' undeclared (first use in this function)|
C:\Users\Gary\Desktop\c\firstproga.c|10|note: each undeclared identifier is reported only once for each function it appears in|
C:\Users\Gary\Desktop\c\firstproga.c|11|error: expected ';' before '}' token|
||=== Build finished: 4 errors, 0 warnings (0 minutes, 0 seconds) ===|