home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
353_02
/
usedate.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1992-01-19
|
743b
|
29 lines
// Chapter 5 - Program 12
// This is a very limited test of the date class
#include <iostream.h>
#include "date.h"
void main(void)
{
date today, birthday;
birthday.set_date(7, 21, 1960);
cout << "Limited test of the date class\n";
cout << "Today is " << today.get_date_string() << "\n";
cout << "Birthday is " << birthday.get_date_string() << "\n";
today.set_date_format(4);
cout << "Today is " << today.get_date_string() << "\n";
cout << "Birthday is " << birthday.get_date_string() << "\n";
}
// Result of execution
// Limited test of the date class
// Today is Jan 20, 1992
// Birthday is Jul 21, 1960
// Today is 20 Jan 1992
// Birthday is 21 Jul 1960