title: Comma omitted in variadic function declaration in C++
body: <p>I am used to declaring variadic functions like this:</p>
  
  <pre><code>int f(int n, ...);
  </code></pre>
  
  <p>When reading <em>The C++ Programming Language</em> I found that the declarations in the book omit the comma:</p>
  
  <pre><code>int f(int n...); // the comma has been omitted
  </code></pre>
  
  <p>It seems like this syntax is C++ specific as I get this error when I try to compile it using a C compiler:</p>
  
  <blockquote>
    <p><code>test.c:1:12: error: expected ‘;’, ‘,’ or ‘)’ before ‘...’ token
         int f(int n...);</code></p>
  </blockquote>
  
  <p>Is there any difference between writing <code>int f(int n, ...)</code> and <code>int f(int n...</code>)? </p>
  
  <p>Why was this syntax added C++?</p>