title: Generating function names with strings using macros in C
body: <p>I've two functions:</p>
  
  <pre><code>void foo0(int bar);
  void foo1(int bar);
  </code></pre>
  
  <p>I wan't to be able create a macro <code>QUX</code> that will expand to these function names based on another macro <code>BAZ</code>. I tried the following:</p>
  
  <pre><code>#define BAZ 0
  #define QUX(x) foo##BAZ(x)
  </code></pre>
  
  <p>But it did not work since the generated function was <code>fooBAZ()</code>. How can I get it to generate <code>foo0()</code>?</p>