    14:	main() 
    15:	{ 
    16:	TTime appointment;     //   TTime 
    18:	appointment.month = 7; //  -  
    19:	appointment.day =14;   
    20:	appointment.year = 1996; 
    21:	appointment.hour = 8; 
    22:	appointment.minute = 30; 
    23:	cout  "Appointment == "; 
    24:	appointment.Display() ; //  - 
    25:	cout  '\n' ; 
    26:	return 0;                           , 
    27:	} 
    28: 
    29:	void TTime::Display(void) 
    30:	{ 
    31:	char s[32]; 
    32:	sprintf(s, "Date: %02d/%02d/%04d Time: %02d:%02d\n", 
    33:	month, day, year, hour, minute); 
    34:	cout  s ; 
    35:         }

      4-12   TTime.     
  ,         
,    .
        29-35,      
Display().       -  
 . 
        -       
 .   void TTime::Display(void)  
,  Display()    TTime.     
  -,        
-    Display(),    . 
        -       . 
,   32-33   -  
TTime  month, year, hour  minute. 
        TTime   ,     
 .    16,  appointment,    
TTime.    ,     . 
 TTime    , ,    .  
    ,  appointment,  ,  
 . 
    ,   18-22   - appointment, 
   .    24,  - 
Display(),    ,   appointment.    
        .   
      -  ( 
   public)     
.      (.  24), C++  
,       - 
 . ,   24   Display()  
  - appointment.      
   TTime,   : 

    TTime today; 
    TTime tomorrow; 
    TTime yesterday; 

        ,       : 

    today.Display();		//     today 
    tomorrow.Display();	//     tomorrow 
    yesterday.DisplayO;	//     yesterday 

     

    C++      - ,  
. ,    class  struct   
  public,   ,   . ( 
       ). ,  
 -:         
   . 

     CLASS1.CPP       
  ,  .  -   
TTime    , ,    
  ,  ,     18-22. -


    308 (195)    III.   ANSI C++ 
