typedef int(*mycb)(bool); int counter(bool reset = false) {   static int c = 0;   if(reset) c=0;   return c++;   } mycb x = counter; printf("%i\n", (x)(false)); printf("%i\n", (x)(false)); printf("%i\n", (x)(true));