title: Function overloading -- two functions only differ by a default parameter
body: <pre><code>class A{
      public:
          void foo(int x)
          {
              cout &lt;&lt; "foo with one\n";
          }
  
          void foo(int x, int y=10)
          {
              cout &lt;&lt; "foo with two\n";
          }
  };
  
  int main()
  {
      A a;
      a.foo(1);   //error?
  }
  </code></pre>
  
  <p>So, why can't I overload <code>void foo(int)</code> with a function that takes a default parameter?</p>