title: "More than one operator + matches these operands" error
body: <p>I'm creating a Money class for a school assignment.  I've defined a conversion from Money to double, I have a constructor for Money that takes an int, another constructor takes a double, and I've overloaded the "+" operator to add together two objects of type Money.  The error message comes up when I try to do something like <code>myMoney + 10</code> where my myMoney is an object of type Money, and 10 is obviously an integer.  Here's the rest of the relevant code: </p>
  
  <pre><code>class Money {
  private:
      int dollars;
      int cents;
  public:
      Money(double r);
      Money(int d) : dollars(d), cents(0) {}
      operator double();
  }
  
  Money operator+(Money a, Money b) {
      double r = double(a) + double(b);
      return Money(r);
  }
  
  Money::operator double() {
      return dollars+double(cents)/100;
  }
  
  Money::Money(double r) {
      ...
  }
  </code></pre>
  
  <p>The program actually works if I try <code>Money(double(myMoney)+10)</code> and also if I make both constructors explicit, but I'm not sure I understand what's happening with the automatic conversions otherwise.  Can anyone explain this behavior?</p>