writing c++ operator- overload?
<p>i was about to finish my assignment when i got a problem with operator- overloading, error says</p>

<p>Error   1   error C2661: 'Date::Date' : no overloaded function takes 3 arguments c:\users\86\documents\visual studio 2010\projects\assignmnent 3 840\assignmnent 3 840\date.cpp 137</p>

<p>2   IntelliSense: no instance of constructor "Date::Date" matches the argument list c:\users\86\documents\visual studio 2010\projects\assignmnent 3 840\assignmnent 3 840\date.cpp  137</p>

<p>and its marking Date in return Date(mt,dy,yr); please help, i have been trying this thing for 3 hours already now.</p>

<p>here is the code</p>

<pre><code>////////////////////date.h


#include &lt;iostream&gt;
using namespace std;


class Date
{
private:
int day,month,year ;

public:

Date ();
void setValues();
//   int getValues() ;
Date operator=(const Date &amp;);
//
Date(const Date &amp;);
// 

//friend     Date operator+(Date a,Date b);
Date operator-(const Date &amp;);


friend bool operator&gt;(Date a, Date b);
friend bool operator==(Date a, Date b);
friend ostream &amp;operator&lt;&lt;(ostream &amp;out, Date a);
friend istream &amp;operator&gt;&gt;(istream &amp;in, Date &amp;a);




//



};

/////////////////date.cpp

#include &lt;iostream&gt;
using namespace std;


class Date
{
private:
int day,month,year ;

public:

Date ();
void setValues();
//   int getValues() ;
Date operator=(const Date &amp;);
//
Date(const Date &amp;);
// 

//friend     Date operator+(Date a,Date b);
Date operator-(const Date &amp;);


friend bool operator&gt;(Date a, Date b);
friend bool operator==(Date a, Date b);
friend ostream &amp;operator&lt;&lt;(ostream &amp;out, Date a);
friend istream &amp;operator&gt;&gt;(istream &amp;in, Date &amp;a);




//



};

////////driver.cpp
//test.cpp
#include "date.h"
#include &lt;iostream&gt;
using namespace std;
int main()
{
Date date1;
Date date2 = date1; //copy constructor called

cout &lt;&lt; "Initial date values\n";
cout &lt;&lt; "Date 1 is ";
cout &lt;&lt; date1 &lt;&lt; endl;
cout &lt;&lt; "Date 2 is ";
cout &lt;&lt; date2 &lt;&lt; endl;
cout &lt;&lt; "Enter a date no earlier than 1800\n";
cin &gt;&gt; date1;




cout &lt;&lt; "Enter another date no earlier than 1800\n";
cin &gt;&gt; date2;
cout &lt;&lt; "Revised date values\n";
cout &lt;&lt; "Date 1 is ";
cout &lt;&lt; date1 &lt;&lt; endl;
cout &lt;&lt; "Date 2 is ";
cout &lt;&lt; date2 &lt;&lt; endl;

if (date1 == date2)
cout &lt;&lt; "The two input dates are the same\n";
else if (date1 &gt; date2)

{
cout &lt;&lt; "Date 1 is later in time than Date 2 by ";
Date temp = date1 - date2;
cout &lt;&lt; temp &lt;&lt; endl;
}
else
{
cout &lt;&lt; "Date 2 is later in time than Date 1 by ";
Date temp = date2 - date1;
cout &lt;&lt; temp &lt;&lt; endl;
}



//Date date3, date4;
//date4 = date3 = date2; //overloaded assignment operator called
//cout &lt;&lt; "After the assignment date4 = date3 = date2\n";
//cout &lt;&lt; " Date 3 is " &lt;&lt; date3 &lt;&lt; " and Date 4 is " &lt;&lt; date4 &lt;&lt; endl;
return 0;
}
</code></pre>
