Hello. I have a problem. I want to define a constant array.
when I try to compile with gcc I get that errorCode:#include <stdio.h> #include <stdlib.h> #define array[] {'a', 'b', 'c'} int main() { system("clear"); printf("\n\n%c\n\n", array[0]); return 0; }
p.c:4:13: warning: missing whitespace after the macro name
p.c: In function 'main':
p.c:11: error: syntax error before '[' token
Any one who knows how to define a constant array? Pleace help? Thank you.