//to evaluate the expression A=2-B where A and B are objects of a class
#include <iostream>
using namespace std;
class Time
{
#include <iostream>
using namespace std;
class Time
{
private:
int h,m,s;
public:
Time()
{
h=m=s=0;
}
Time(int hr,int min,int sec)
{
h=hr;
m=min;
s=sec;
}
int h,m,s;
public:
Time()
{
h=m=s=0;
}
Time(int hr,int min,int sec)
{
h=hr;
m=min;
s=sec;
}
No comments:
Post a Comment