function overloading not happening in C++
<p>I am using borland turbo C++ complier (4.5). This is my code but i am getting error as follows: Multiple declaration for 'time::add(time)'.Here i am juss overloading the add() three times the error comes in the 3rd overload i.e in "void add(time t1)".</p>

<pre class="lang-cpp prettyprint-override"><code> #include&lt;iostream.h&gt;
 #include&lt;conio.h&gt;
 class time
 {
 int h,m;
 public:
 void input()
 {
    cout&lt;&lt;"\n Enter hour :";
    cin&gt;&gt;h;
    cout&lt;&lt;"\n Enter min :";
    cin&gt;&gt;m;
 }
 void display()
 {
    cout&lt;&lt;"\n time is : "&lt;&lt;h&lt;&lt;":"&lt;&lt;m;
 }
 void add(time t1,time t2)
 {
    h=t1.h+t2.h+(t1.m+t2.m)/60;
    m=(t1.m+t2.m)%60;
 }
 time add(time t1)
 {
     time t3;
     t3.h=h+t1.h+(m+t1.m)/60;
     t3.m=(m+t3.m)%60;
     return t3;
 }
 void add(time t1)
 {
    h=h+t1.h+(m+t1.m)/60;
    m=(m+t1.m)%60;
 }
 };
 int main()
 {
    time t1,t2,t3;
    t1.input();
    t2.input();
    t3.add(t1,t2);
    t3.display();
    t3=t2.add(t1);
    t3.display();
    t2.add(t1);
    t2.display();
    return 0;
 }
</code></pre>
