title: Token pasting in C
body: <p>After reading about <a href="http://groups.google.com/group/comp.std.c/browse_frm/thread/77ee8c8f92e4a3fb" rel="nofollow noreferrer"><strong>VA_NARG</strong></a></p>
  
  <p>I tried to implement function overloading depending on number of arguments in <strong>C</strong> using macros.
  Now the problem is:</p>
  
  <pre><code>void hello1(char *s) { ... }
  void hello2(char *s, char *t) { ... }
  // PP_NARG(...)           macro returns number of arguments :ref to link above
   // does not work
  #define hello(...)         hello ## PP_NARG(__VA_ARGS__)  
  
  int main(void)
  {
     hello("hi");   // call hello1("hi");
     hello("foo","bar"); // call hello2("foo","bar");
     return 0;
  }
  </code></pre>
  
  <p>I've read <a href="http://c-faq.com/ansi/stringize.html" rel="nofollow noreferrer">this</a> from C-faq. But still could not get it to work...</p>