218                                            ?. Ad hoc 

    ,     -
.  ,        7.5, 
 ,  . 199:

  clock.

//  clock

class clock {
public:

 clock(unsigned long i);//  

void print() const;    // 

void tick();          //  

clock operator++()

{ this -> tick(); return (*this); }

void reset (const clock& c);

private:

unsigned long tot_secs, sees, mins, hours, days;

};

void clock::reset(const clock& c)
{

tot_secs = c.tot_secs;

sees = c.secs;

mins = c.mins;

hours = c.hours;

days = c.days;

\

J

int main()
{

clock cl(900), c2(400) ;

cl.reset(c2) ;

c2.reset(100) ;

}

 reset (100)      int  clock, -
    ,  -
 clock (unsigned).     ,  -
        explicit,
      .



1.      . ,   + b
  ,       b.  
   ,     