title: parameter name omitted, C++ vs C
body: <p>In C++, I tend to omit the parameter's name under some circumstances. But in C, I got an error when I omitted the parameter's name.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>void foo(int);  //forward-decl, it's OK to omit the parameter's name, in both C++ and C
  
  int main()
  {
      foo(0);
      return 0;
  }
  
  void foo(int)  //definition in C, it cannot compile with gcc
  {
      printf("in foo\n");
  }
  
  void foo(int)  //definition in C++, it can compile with g++
  {
      cout &lt;&lt; "in foo" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Why is that? Can't I omit the parameter's name in C function definition?</p>