     13.1.  CLASS. ( TTime) 

    1:	#include <iostream.h> 
    2:	#include <stdio.n> 
    3: 
    4:	class TTime { 
    5:	public: //   
    6:	  int year; // - 
    7:	  int month; // " " 
    8:	  int day; // " " 
    9: 	  int hour; // " " 
    10:	  int minute; // " " 
    11:	  void Display(void); // - 
    12:	}; 
    13:
    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:         }


     13.2.  CLASS2.CPP (    TTime)

    1:	#include <iostream.h> 
    2:	#include <stdio.h> 
    3:	 
    4:	class TTime { 
    5:	private:
    6:             int year ; 
    7:             int month ; 
    8:             int day; 
    9:             int hour; 
    10:           int minute; 
    11:	public: 
    12:           void Display(void) ; 
    13:           void GetTime( int &m, int &d, int &y, int &hr, int &min ) ; 
    14:           void SetTime( int m, int d, int y, int hr, int min ) ; 
    15:	}
    16: 
    17:	main() 
    18:	{ 
    19:	TTime appointment; 
    20:	int month, day, year, hour, minute; 
    21: 
    22:	appointment.SetTime(7, 14, 1996, 8, 30); 
    23:	cout  "Appointment == ";                      . 
    24:	appointment. Display() ; 
    25:	appointment.GetTime( month, day, year, hour, minute ) ; 
    26:	appointment.SetTime( month, day, year, --hour, minute ) ; 
    27:	cout  "Next hour == ";
    28:	appointment. Display() ; 
    29:	return 0 ; 
    30:	} 
    31:
    32:	void TTime::Display(void) 
    33:	{ 
    34:	char s[32]; 
    35:	sprintf(s, "Date: %02d/%02d/%04d Time: %02d:%02d\n", 
    36:	month, day, year, hour, minute); 
    37:	cout  s; 
    38:	} 
    39: 
    40:	void TTime::GetTime(int &m, int id. int &y, int ihr, int &min) 
    41:	{ 
    42:	m = month; //  - ,    
    43:	d = day ; 
    44:	 = year ; 
    45:	hr = hour ;
    46:	min = minute ; 
    47:	} 
    49:	void TTime::SetTime(int m, int d, int y, int hr, int min) 
    50:	{ 
    51:	month = m; //   - 
    52:	day = d; 
    53:	year = y; 
    54:	hour = hr; 
    55:	minute = min; 
    56:	}


     13.3. TIME1.H (  TTime   ) 

    1:	// timel.h --   TTime 
    2: 
    3:	#ifndef __TIME1_H 
    4:	#define _TIME1_H 1 //   #include 
    5: 
    6:	class TTime { 
    7:	private: 
    8:	  int month; 
    9:	  int day; 
    10:	  int year; 
    11:	  int hour; 
    12:	  int minute; 
    13:	public: 
    14:	  void Display(void); 
    15:	  void GetTime(int &m,  int &d,  int &y,, int &hr,  int tain); 
    16:	  void SetTime(int m,   int d,   int y,   int hr,   int min); 
    17:	  char *GetSTime(void);                                                  
    18:	  void ChangeTime(long nminutes); 
    19:	}; 
    20: 
    21:	#endif // __TIME1_H 


     13.4.  TIME.CPP (  TTime) 

    1:	// timel.cpp --   Ttime 
    2: 
    3:	#include <iostream.h> 
    4:	#include <stdio.h> 
    5:	#include <dos.h> 
    6:	#include <string.h>
    7:	#include "timel.h" 
    8: 
    9:	//     
   10:	void TTime::Display(void) 
    11:	{ 
    12:	char s[30]; 
    . 13:	sprintf(s, "Date: %02d/9402d/%04d Time: %02d:%02d", 
    14:	month, day, year, hour, minute ); 
    15:	cout  s  '\n'; 
    16:	} 
    17: 
    18:	//   -    
    19:	void TTime::GetTime(int &m, int &d,. int &y, int &hr, int &min) 
    20:	{ 
    21:	m = month; //  - ,    
    22:	d = day; 
    23:	 = year; 
    24:	hr = hour; 
    25:	min = minute; 
    26:	} 
    27: 
    28:	//  -   
    29:	void TTime::SetTime(int m, int d, int y, int hr, int min) 
    30:	{ 
    31:	month = m; //   - 
    32:	day = d; 
    33:	year = y; 
    34:	hour = hr; 
    35:	minute = min; 
    36:	} 
    37: 
    38:	//        
    39:	char- *TTime: :GetSTime(void) 
    40:	{ 
    41:	char buffer[40]; //   
    42:	char *cp; //   ,   43: 
    44:	sprintf(buffer, "Date: %02d/%02d/%04d Time: %02d:K02d\n", 
    45:	month, day, year, hour, minute ); 
    46:	cp = strdup(buffer); //      
    47:	return cp; 
    48:	}
    50:	//  nminutes (  )    
    51:	void TTime::ChangeTime(long nminutes) 
    52:	{ 
    53:	struct date ds; 
    54:	struct time ts; 
    55:	long timeinsecs; 
    56: 
    57:	ds.da_year = year; 
    58:	ds.da_mon = month; 
    59:	ds.da_day = day; 
    60:	ts.ti_hour = hour; 
    61:	ts.tijnin = minute; 
    62:	ts.ti_sec = 0; 
    63:	ts.ti_hund = 0; 
    64:	timeinsecs = dostounix(&ds, &ts); 
    65:	timeinsecs += (nminutes * 60); 
    66:	unixtodos(timeinsecs, &ds, &ts); 
    67:	year = ds.da_year; 
    68:	month = ds.da_mon; 
    69:	day = ds.da_day; 
    70:	hour = ts.ti_hour; 
    71:	minute = ts.ti min; 
    72:	} 


     13.5. APPOINT1.CPP (   ) 

    1:	#include <iostream.h> 
    2:	#include <stdio.h> 
    3:	#include "time1.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:	}


     13.6.  TIME2.H (  TTime) 

    1:   // time2.h --   TTime 
    2: 
    3:   #ifndef  _TIME2_H 
    4:   #define _TIME2_H 1 //   include 
    5: 
    6:  class TTime { 
    7:  private: 
    8:     long dt; //    -    1  1970  
    9:  public: 
  10 :   void Display(void); 
  11:    void GetTime(int &m, int &d, int &y, int &hr, int &min); 
  12:    void SetTime(int m, int d, int y, int hr, int min); 
  13:    char *GetSTime(void); 
  14:    void ChangeTime(long nminutes); 
  15:  } ; 
  16: 
  17: #endif // _TIHE2_H


     13.7.  TIME2.CPP (   TTime)	: 

    1:    // time2.cpp --   TTime 
    2
    3:	#include <iostream.h>
    4:	#include <time.h>
    5:	#include <dos.h>
    6:	#include <string.h>
    7:	#include "time2.h"
    8: 
    9:    //    ; 
    10:     void   TTime:: Display( void)) 
    11:     { 
    12:	cout  ctime(&dt) ; 
    13:      } 
    14: 
    15:	//   - (                         
    16:	void TTine::GetTime(int &m,  int id,   int &y,  int &hr,  int &min)    
    17:	{ 
    18:	  struct date ds; 
    19:	  struct tine ts; 
    20: 
    21:	  unixtodos(dt,  &ds,  &ts); 
    22:	   = ds.da_year; 
    23:	  m = ds.da_mon; 
    24:	  d = ds.da_day; 
    25:          hr = ts.ti_hour; 
    26:          nin = ts.ti_min; 
    27:	} 
    28: 
    29:	//   dt 
    30:	void TTime::SetTime(int m,   int d,  int y,  int hr,  int min) 
    31:	{ 
    32:	struct date ds; 
    33:	struct time ts; 
    34; 
    35:	ds.da_year = ; 
    36:	ds.da_mon = m; 
    37:	ds.da day = d;                                 
    38:	ts.tilhour = hf 
    39:	ts.tijnin = min; 
    40:	ts.ti_sec = 0; 
    41:	ts.ti hund = 0; 
    42:	dt = dostounix(&ds, &ts); 
    43:	} 
    44: 
    45:	//        
    46:	char TTime: :GetSTime(void) 
    47:	{ 
    48:	char *cp = strdup(ctime(&dt));
    49:	return ; 
    50         } 
    51 
    52:	//  nninutes (  )   
    53:	void TTime::ChangeTime(long nminutes) 
    54:	{ 
    55:	dt += (nminutes * 60); 
    56:	} 


     13.8. APPOIN'2 CPP (   ) 

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


     13.9.  (   TTime   -) 

    1:    // time3.h --   TTime 
    2  
    3:    #ifndef _I_ 
    4:    #define _TIME3_H 1 //  ((include 
    5:    
    6:    #include <iostream.h>                 
    7:    # include <time.h>                             
    8:    #include <string.h>                      
    9: 
  10:    class TTime { 
  11:     private:                                                            
  12:	  long dt; //    -    1  1970  
  13:      public: 
  14:	 void Display(void) { cout  ctime(&dt); } 
  15:	 void 6etTime(int &m, int &d, int &y, int &hr, int &min); 
  16:	 void SetTime(int m, int d, int y, int hr, int min);                    
  17:	 char *GetSTime(void) 
  18:	{ 
  19:	  char *cp = strdup(ctime(&dt)); 
  20:	  return cp; 
  21:	} 
  22:	void ChangeTime(long nminutes) { dt += (nminutes * 60);  } 
  23:     } ; 
  24: 
  25:   #endif // __IME_ 


     13.10.  TIME3.CPP (    TTime) 

    1:	// timeS.cpp --   TTime 
    2: 
    3:	#include <dos.h>                                                       
    4:	#include "timeS.h" 
    5:	
    6:	//   -                     
    7:	void TTime::GetTime(int &m, int &d, int &y, int &hr, int &min) 
    8:	{                                                : 
    9:	struct date ds;                                
  10:	struct time ts;                                      
  11:
  12:	unixtodos(dt, &ds. &ts);                 
  13:	y.= ds.da_year; 
  14:	m = ds.da_mon; 
  15:	d = ds.da_day; 
  16:	hr = ts.ti_hour;                                                      
  17:          min = ts.ti min;	
  19: 
  20:	//   dt 
  21:	void TTime: :SetTime(int m,  int d,  int y,  int ir, int min)
  22:	{ 
  23:	struct date ds;                                                        
  24:	struct time ts;                                                        
  25: 
  26:	ds.da_year = y; 
  27:	ds.da mon = m; 
  28:	ds.dalday = d; 
  29:	ts.tijiour = hr; 
  30:	ts.tijnin = min;                                                       
  31:	ts.ti_sec = 0; 
  32:	ts,ti_hund = 0; 
  33:	dt = dostounix(&ds, &ts); 
  34:	} 


     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:	}


     13.12.  TIME4.H ( TTime   -) 

    1:	// time4.h --   TTime                                   
    2:	
    3:	#ifndef  __TIME4_H 
    4:	#define __TIME4 H 1 //   #include
    5:	 
    6:	#include <iostream. h>    
    7:	#include <time.h>       
    8:	#include <string.h>                
    9:	
    10:	class TTime {
    11:	private:                
    12:	  long dt; //    -    1  1970           
    13:	public: 
    14:	  void Display(void) { cout  ctime(&dt); } 
    15;	  void GetTime(int im, int id, int &y, int &hr, int &min); 
    16:	  void SetTime( int m, int d, int y, int hr, int min); 
    17:	  void SetTime( int m, int d, int y, int hr); 
    18:	  void SetTime( int m, int d, int y); 
    19:	  void SetTitne( int m, int d);                   
    20:	  void SetTime( int m);            
    21:	  void SetTime(void); 
    22:	  char *GetSTime(void) 
    23:	  { 
    24:	   char *cp = strdup(ctime(&dt)); 
    25:	   return cp;                                                             
    26:	  } 
    27:	  void ChangeTime(long nminutes) { dt += (nminutes * 60); } 
    28:    }; 
    29: 
    30:  #endif // __TIME4_H


     13.13.  TIME4.CPP (  -) 
    
    1:	// time4.cpp --   TTime 
    2: 
    3:	#include <dos.h> 
    4:	#include "time4.h" 
    5: 
    6:	//   -    
    7:	void TTime::GetTime(int &m, int &d, int &y, int &hr, int imin) 
    8:	{ 
    9:	struct date ds; 
    10:	struct time ts; 11: 
    12:	unixtodos(dt, &ds, its); 
    13:	 = ds.da_year;            
    14:	m = ds.dajnon; 
    15:	d = ds.da_day; 
    16:	hr = ts.ti_hour;                                           
    17:	min = ts.tijnin; 
    18:	} 
    19: 
    20:	//   dt 
    21:	void TTime::SetTime(int m, int d, int y, int hr, int min) 
    22:	{ 
    23:	struct date ds; 
    24:	struct time ts; 
    25:	
    26:	getdate(ids); //      
    27:	gettime(&ts); 
    28:	if ( >= 0) ds.da_year = ; 
    29:	if (m >= 0) ds.da_mon = m; 
    30:	if (d >= 0) ds.da_day = d; 
    31:	if (hr >= 0) ts.ti hour = hr; 
    32:	if (min >= 0) ts.ti_min = min; 
    33:	ts.ti_sec = 0;         
    34:	ts.ti_hund = 0;                 
    35:	dt = dostounix(ids, its);  : 
    36:	}                   
    37: 
    38:	void TTime::SetTime(int m, int d, int y, int hr) 
    39:	{ 
    40:	SetTime(m, d, y, hr, -1);  
    41:	} 
    42: 
    43:	void TTime: : SetTime(int m, int d, int y)  
    44:	{ 
    45:	SetTime(m, d, y, -1. -1); 
    46:	} 
    47: 
    48:	void TTime::SetTime(int m,   int d) 
    49:	{                                                                      
    50:	SetTime(m,  d,  -1,   -1,   -1); 
    51:	} 
    52: 
    53:	void TTime::SetTime(int m)    = 
    54:	{ 
    55:	SetTime(n,   -1,   -1,   -1,   -1); 
    56:	} 
    57:	
    58:	void TTime::SetTime(void) 
    59:	{
    60;	 SetTime(-1,   -1,   -1,   -1,   -1);                                   
    61:	}


     13.14.  OVERMF.CPP (  -)

    1:	#include	<iostream.h> 
    2:	#include	<stdio.h> 
    3:	#include	"time4.h"
    4:	
    5:	main()
    6.      {
    7:           TTime appointment;
    9:	appointment.SetTime();
    10:	appointment.Display();            
    11:	appointmentSetTime(8); 
    12:	appointment.Display(); 
    13:	appointment.SetTime(8, 1);
    14:	appointment.Display ( );            
    15:	appointment.SetTime(8, 1, 1996);     
    16:	appointment.Display(); 
    17:	appointment.SetTime(8, 1, 1996, 8); 
    18:	appointment.Display(); 
    19:	appointment.SetTime(8, 1, 1996, 8, 30); 
    20:	appointment.Display(); 
    21:	return 0; 
    22:    } 



     13.16.  TIME5.CPP (   TTime) 

    1:   // time5.cpp    TTime 
    2: 
    3:      #include <dos.h> 
    4:      #include "time5.h" 
    5:
    6:	//   -    
    7:	void TTime: : GetTime( int &m, int &d, int &y, int &hr, int &min) 
    8:	{ 
    9:	  struct date ds; 
    10:	  struct time ts; 11: 
    12:	  unixtodos(dt, &ds, &ts); 
    13:	   = ds.da_year; 
    14:	  m = ds.da_mon;                                 
    15:	  d = ds.da_day; 
    16:         hr = ts.ti_hourr;  
    17:	min = ts.ti_min;
    18:         }
    19:
    20:      //   dt                                      
    21:      void TTime::SetTime(int m,  int d,  int y,~ int hr,  int min) 
    22:      {
    23:	struct date ds; 
    24:	struct time ts;                  
    25:
    26:	getdate(Sds);  //      
    27:	gettirae(&ts); 
    28:	if ( >= 0) ds.da_year = ; 
    29:	if (m >= 0) ds.da_mon = m; 
    30:	if (d >= 0) ds.da_day = d; 
    31:	if (hr >= 0) ts.ti_hour = hr; 
    32:	if (min >= 0) ts.tijnin = min; 
    33:	ts.ti_sec = 0; 
    34:	ts.ti_hund = 0; 
    35:	dt = dostounix(&ds,  &ts); 
    36:	} 
    

     13.17.  DEFAULT.CPP (  -  ) 

    1:	#include <iostream.h>               
    2:	#include <stdio.h>     
    3:	#include "times. h"	
    4:		
    5: 
    6:	main()          
    7: 
    8.	TTime appointment;   
    9:	appointment . SetTime( ) ; 
    10:	appointment . Display ( ) ; 
    11:	appointment. SetTime(8);	
    12:	appointment . Display ( ) ;	
    13:	appointment. SetTime( 8, 1); 
    14:	appointment. Display( ) ; 
    15:	appointment. SetTime(8, 1, 1996); 
    16:	appointment . Display( ) ; 
    17:	appointment. SetTime(8, 1, 1996, 8); 
    18:	appointment. Display( );	
    19:	appointment. SetTiue(8, 1. 1996, 8,. 30);	
    20:	appointment . Display ( ) ;	
    21:	return 0;	
    22:	} 


     13.18. TIME6.H (  TTime    ) 

    1:   // time6.h --   TTime 2: 
    3:   #ifndef __TIME6_H 
    4:   #define __TIME6_H 1 //   include 5: 
    6:   #include <iostream.h>	
    7:   #include <time.h>           
    8:   #include <string.h> 
    9:
    10:	class TTime {
    11:	private:
    12:	   long dt; //    -    1  1970  
    13:	   char *dts; // 	      
    14:	   void DeleteDts(void); //   tits 
    15:	public: 
    16:	  TTime() ; //  
    17:	  TTime( int m, int d = -1, int y =	-1,	//	 
    18:		int hr = -1, int min = -1) ; 
    19:	 ~TTime(); //  
    20:	 void Display(void) { cout 	ctime(Sdt);			}
    21:	 void GetTime( int &m, int &d,	int &y, int	&hr, int tain ) ; 
    22:  	 void SetTime(int m = -1, int d =	-1, int y = -1
    23:	 	       int hr = -1, int min = -1);				
    24:		const char *GetSTime(void);				
    25:	void ChangeTime(long nminutes)                                         
    26:	{ dt += (nminutes * 60); DeleteDts(); } 
    27:	}
    28: 
    29:	#endif // __TIHE6_H 


     13.19.  TIME6.CPP ( TTime)

    1:   // time6.cpp --   TTime 
    2: 
    3:   #include <dos.h>	
    4:   #include "time6.h" 
    5: 
    6: //    
    7: TTime::TTime() 
    8: { 
    9:   dts = NULL; //    
  10:   SetTime(-1, -1, -1, -1, -1); 
  11: } 
  12:	
    3:	//   
    4:	TTime::TTime( int m, int d, int y, int hr, int min )
    3:	{ 
    16:	  dts = NULL; //    
    17:	  SetTime(m, d, , hr, min); 
    18:	} 
    19: 
    20:	//         
    21:	TTime::~TTime()
    22:	{ 
    23:	  delete dts; //  ,    
    24.	} 
    25: 
    26:	//   dts             
    27:	void TTime::DeleteDts(void) 
    28:	{ 
    29:	  delete dts; //  ,    
    30:	  dts = NULL; //   
    31:	} 
    32: 
    33:	//   -    
    34:	void TTime::GetTime(int im, int &d, int &y, int &hr, int &min) 
    35:	{ 
    36:	  struct date ds;                
    37:	  struct time ts;                
    38: 
    39:	  unixtodos(dt, &ds, its); 
    40:	   = ds.da_year; 
    41: 	  m = ds.dajnon; 
    42:	  d = -ds.da_day; 
    43;	  hr = ts.ti_hour; 
    44:	  min = ts.tijnin; 
    45:	} 
    46: 
    47:	//   dt 
    48:	void TTime::SetTime(int m,  int d,  int y,  int hr,  int min) 
    49:	{ 
    50:	  struct date ds; 
    51:	  struct time ts; 
    52: 
    53:	  getdate(ids);   //                  
    54:	  gettime(its); 
    55:	  if ( >= 0) ds.da_year =  ;                                        
    56:	  if (m >= 0) ds.dajnon = m ;                                    
    57:	  if (d >= 0) ds.da_day = d ; 
    55:	  if  (hr >= 0) ts.tijiour = hr ;             
    59:	  if (mm >= 0) ts.tijnin = min;                  
    50:	  ts.tijsec = 0 ;
    61:	  ts.tijiund = 0;                                                 
    62:	  dt = dostounix(&ds,  &ts);                                         
    63:	  DeleteDts();  //    
    64:       }                                                           
    65: 
    66:	const char *TTime::GetSTime(void) 
    67:	{                                                                      
    68:	  if (dts)  //   ,     
    69:	    return dts; 
    70:	  dts = strdup(ctime(&dt));                                              
    71:	  return dts;                                                            
    72:	} 


     13.20.   CONSTRUC.CPP (  TTime) 

    1:	#include <iostream. h> 
    2:	#include <stdio.h> 
    3:	#include "time6.h"    
    4: 
    5:	main() 
    6:	{ 
    7:	 TTime t1; 
    8:	 TTime t2(8); 
    9:	 TTime t3(8,   1);
  10:	 TTime t4(8,   1, 1996);     
  11:	 TTime t5(8,   1, 1996,   8 ) ; 
  12:	 TTime t6(8,   1, 1996,  8, 30) ;
  13: 
  14:	 t1.Display(); 
  15:	 t2.Display();		
  16: 	 t3.Display();
  17: 	 t4.0isplay();
  18: 	 t5.Display();
  19:            t6.Display();	
  20:	 return 0 ; 
  21:	} 


     13.21.   DESTRUC.CPP (  TTime) 

    1:   #include <iostream.h> 
    2:   #include <stdio.h> 
    3:   #include "time6.h" 
    4: 
    5:   void f(void); 
    6: 
    7:   main() 
    8:    { 
    9:       f(); 
   10:     return 0; 
   11:    } 
   12: 
   13:   void f(void) 
   14:    { 
   15:     TTime today; 
   16:     const char *sp; 
   17: 
   18:     sp = today.GetSTime(); 
   19:     cout  "First time:   "  sp ; 
   10:     sp = today.GetSTime(); 
   11:     cout  "Second time:   "  sp; 
   12:    } 


     13.22.  OBARRAY1.CPP (    )

    1:	#include <iostream.h> 
    2:	#include <stdiovh> 
    3:	#include "times. h"
    4: 
    5:           main()
    6:	{
    7:	  TTime tarray[6] ;
    8:
    9:	for (int i=0;   i < 6; i++ )
    10:	  tarray[i].Display(): 
    11:	return 0; 
    12:	} 


     13.23.  OBARRAY2.CPP (    ) 

    1:	#include <iostream.h> 
    2.	#include <stdio.h> 
    3:	#include "timee.n" 
    4: 
    5:	main()                                                                
    6:	{                                         .                       
    7:	  TTime tarray[6] = {   TTime(), TTime(8), 
    10:	  TTime(8,   1), 
    11:	  TTime(8,   1,  1996), 
    12:	  TTime(8,   1,  1996,  8), 
    13:	  TTime(8,   1,   1996,   8,   30) 
    14:	  }; 
    15:	  for ( int i = 0 ;   i < 6;   i++ )
    16:	     tarray[i].Display() ;
    17:	  return 0; 
    18:        }
