       -    
  -,     
.  13.11  APPOINT2.CPP   ,   
 3     TIME3.H  TIME2.H. 
  ,   DOS  bcc appoint3 time3.  
       ,   
 APPOINT3.CPP  TIME3.CPP. 

     13.11.  APPOINT3.CPP (   ) 

    1:	#include <iostream.h> 
    2:	#include <stdio.h> 
    3:	#include "time3.h" 
    4:	 
    5:	main() 
    6:	{ 
    7:	TTime appointment; 
    8:	 
    9:	appointment,SetTime(7, 21, 1996, 8, 30); 
    10:	for (int slots = 1; slots <= 17; slots++ ) { 
    11:	appointment. Display() ; 
    12:	appointment.ChangeTime(30) ; 
    13:	
    14	return 0; 
    15:	}
      __________________________________________________ 


      14  1. ( 13.9)    
 -.       
 TTime: 

    class TTime { private: 
    long dt; public: 
    void Display(void)  { cout  ctime(&dt);   } 
    } 

     - DisplayO       
    .       
,      cout. .     
   C++,  ,        
.   ,     ,   
 -,    : 

  class TTime { 
   private: 
     long dt; 
   public: 
     void Display(void) 
     { 
       cout  ctirae(idt); 
     } 
  }; 

        ,     
     - ,    
. ,      Display(),   
    . ,      
     : 

    TTime today; 
    today.SetTime(4,   19,   1998,   6,  0); 

        - Display()   today:

    today. Display();	

       ,    ,      

    cout  ctime(&today.dt); 

    ,        , 
 dt     TTime , ,   . 

     

           , C++     
-    . ,  
 -  ,    
     . 
    
    318	 III.   ANSI C++ 