Greetings
I am trying to learn C and finding myself getting stuck a lot, no complains : )
Anyway, I wrote a program and gcc does not like it, the following code is NOT the program but demonstrate the problem:
#define MAXLINE = 1000
int main()
{
int tmp = MAXLINE;
char line[MAXLINE];
return 0;
}
when compile, I get the following error:
test.c:7: error: expected expression before ‘=’ token
if I replace symbolic constant MAXLINE with int 1000, everything works.
what is going on?
Thanks
--rhr