Original Post
class Distance
{
private:
int feet;
float inches;
public:
Distance operator + ( Distance ) const;
}
Distance Distance::operator + (Distance d2) const
{
int f = feet + d2.feet;
float i = inches + d2.inches;
if(i >= 12.0)
{
i -= 12.0;
f++;
}
return Distance(f,i)
}
tcache Contact Me ----------- AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)