why do i get this error
test.c:6: warning: initializer element is not constant
test.c:6: warning: (near initialization for ‘len’)
when i compile this with "len" as a global int (as shown). It doesn't happen if "len" is localized within main().
Code:1 #include <string.h> 2 #include <stdio.h> 3 4 #define this "that" 5 6 int len = strlen(this); 7 int main () { 8 printf("%d\n", len); 9 }