how we can remove error ?
#include<iostream>
using namespace std;
class time
{
int m;
int h;
public:
void set(int,int);
void sum(time,time,time);
void display();
};
void time::set(int x,int y)
{
m=x;
h=y;
}
void time::sum(time t1,time t2,time t3)
{
m=t1.m+t2.m+t3.m;
h=t1.h+t2.h+t3.h;
}
void time::display(void)
{
cout<<"minute=="<<m<<endl;
cout<<"hours=="<<h<<endl;
}
int main()
{
time a,b,c,d;
a.set(1,2);
b.set(2,4);
c.set(4,8);
d.sum(a,b,c);
//display
a.display();
b.display();
c.display();
d.display();
}

Regards
Rajesh Kumar

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to