I\'m trying to initiate a static variable (inside a function) with malloc in C, but I\'m getting the \"initializer not constant error\". I know that I can\'t initiate a stat
static int *p = NULL; if(!p) p = (int *)malloc(sizeof(int));