This does work
LLIST *mylist[10] = {NULL};
But would if I wanted to do this I get errors:
int x=10;
LLIST *mylist[x] = {NULL};
x can be any value I’m setting it to 10 for the time being. x is going to be used as a counter.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Support for variable length arrays (which your second example uses) came in the C99 standard, which your compiler may not support.
For gcc, you should pass the
-std=c99option when compiling.