const char *mask_usage="mask netmask";
typedef struct
{
const char *name;
const char *doc;
}CmdForm;
static CmdForm parameter[] =
{
{"mask", mask_usage}
};
int main(int argc, char *argv[])
{
return 0;
}
~
clang-3.6 a.c
a.c:14:12: error: initializer element is not a compile-time constant
{"mask", mask_usage}
^~~~~~~~~~
1 error generated.
請問 mask_usage 為什麼不是 compile-time constant?
c++ compiler 則編得過。