I know the limitations for initializers in the file area in c: you cannot use a variable (even const), functions, etc. But I really don't understand why this is not working:
#include <stdlib.h>
#include <stdio.h>
unsigned long a = 's' > '0';
int main(void)
{
printf("a = %lu\n",a);
return 0;
}
Why does a string literal string give: error: the initializer element is not a constant. String literals not considered constant? Is there any way to make it work?
Thank you in advance
source
share