title: Macro directives in C, my code example doesn't work
body: <p>I want to get the following code piece work:</p>
  
  <pre><code>#define READIN(a, b) if(scanf('"#%d"', '"&amp;a"') != 1) { printf("ERROR"); return EXIT_FAILURE; }
  
  int main(void)
  {
      unsigned int stack_size;
      printf("Type in size: ");
      READIN(d, stack_size);
  }
  </code></pre>
  
  <p>I don't get it, how to use directives with the <code>#</code> operator. I want to use the <code>scanf</code> with print ERROR etc. several times, but the <code>"'"#%d"'</code> &amp; <code>'"&amp;a"'"</code> is I think completely wrong. Is there any way to get that running? I think a macro is the best solution or not?</p>