title: How to pass variable number of arguments to printf/sprintf
body: <p>I have a class that holds an "error" function that will format some text.  I want to accept a variable number of arguments and then format them using printf.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>class MyClass
  {
  public:
      void Error(const char* format, ...);
  };
  </code></pre>
  
  <p>The Error method should take in the parameters, call printf/sprintf to format it and then do something with it.  I don't want to write all the formatting myself so it makes sense to try and figure out how to use the existing formatting.</p>