title: How to use __VA_ARGS__ inside a C function instead of macro?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/205529/c-c-passing-variable-number-of-arguments-around">C/C++: Passing variable number of arguments around </a>  </p>
  </blockquote>
  
  
  
  <p>I'm currently using the following macro declared on my C file. </p>
  
  <pre><code>#define COMMON_Print(...) printf (__VA_ARGS__)
  </code></pre>
  
  <p>Now that call works just fine, but turns out that I need to be able to create a C function that looks something like this:</p>
  
  <pre><code>void COMMON_Print(...)
  {    
      printf (__VA_ARGS__);
  }
  </code></pre>
  
  <p>So that function doesn't work, I get an error </p>
  
  <blockquote>
    <p>"Error   : undefined identifier __VA_ARGS__"</p>
  </blockquote>
  
  <p>The complexity of my project requires to have a function since it's an interface... So how can I get the parameters ... and pass them to the printf function? Or better what am I doing wrong?</p>
  
  <p>Thanks!</p>