Listing 18 Illustrates the Person class

// tperson.cpp
#include <iostream.h>
#include "person.h"     // includes date5.h

main()
{
   Date d1(12,16,1947);
   Person p1("Richardson","Alice",d1,"123-45-6789");
   Person p2("Doe","John");

   cout << "p1 == " << p1 << endl;
   cout << "p2 == " << p2 << endl;
   cout << "p1 " << (p1 == p2 ? "does"
                          : "does not")
       <<" equal p2" << endl;

   Person p3;
   p3 = p2;
   cout << "p3 " << (p3 == p2 ? "does"
                          : "does not")
       << "equal p2" << endl;

   return 0;
}

p1 == {Richardson,Alice,[December 16, 1947],123-45-6789}
p2 == {Doe,John,[Bad month 0, 0],}
p1 does not equal p2
p3 does equal p2
// End of File