title: No matching function for call to [class]
body: <p>So, I have some classes that I was defining, and it gave me errors for this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;;
  
  //void makepayment(int amount, string name, Date date);
  //void listpayments();
  
  class Date;
  
  class Date {
    public:
      int month;
      int day;
      int year;
      Date(int month, int day, int year) {
        this-&gt;month = month;
        this-&gt;day = day;
        this-&gt;year = year;
      }
  };
  
  class Payment {
    public:
      int amount;
      string name;
      Date date;
      Payment(int amount, string name, Date date) {
        this-&gt;amount = amount;
        this-&gt;name = name;
        this-&gt;date = date;
      }
  };
  
  int main() {
  cout &lt;&lt;
  "|~~~~~~~~~~~~~~~~~~~~~~~~| \n" &lt;&lt;
  "|   WELCOME TO THE       | \n" &lt;&lt;
  "|   WESSLES BANK         | \n" &lt;&lt;
  "|   MANAGEMENT SYSTEM!   | \n" &lt;&lt;
  "|~~~~~~~~~~~~~~~~~~~~~~~~| \n";
  
  for(;;) {
  
  }
  
  return 0;  
  }
  </code></pre>
  
  <p>The error was:</p>
  
  <pre><code>foo.cpp: In constructor ‘Payment::Payment(int, std::string, Date)’:
  foo.cpp:26:49: error: no matching function for call to ‘Date::Date()’
  foo.cpp:26:49: note: candidates are:
  foo.cpp:14:5: note: Date::Date(int, int, int)
  foo.cpp:14:5: note:   candidate expects 3 arguments, 0 provided
  foo.cpp:9:7: note: Date::Date(const Date&amp;)
  foo.cpp:9:7: note:   candidate expects 1 argument, 0 provided
  </code></pre>
  
  <p>I have no idea what is wrong! What does 'no matching function for call' mean?</p>
  
  <p>Sorry if this is a noobie question... I just started c++.</p>