Listing 17 The Person class implementation

// person.cpp
#include <iostream.h>
#include "person.h"

Person::Person(const string& 1, const string& f,
            const Date& b, const string& s)
   : last(1), first(f), birth(b), ssn(s)
{}

ostream& operator<<(ostream& os, const Person& p)
{
   os << '{'
      << p.last << ','
      << p.first << ','
      << '[' << p.birth << ']' << ','
      << p.ssn
      << '}';
   return os;
}

bool Person::operator==(const Person & p) const
{
   return last == p.last &&
         first == p.first &&
         birth == p.birth &&
         ssn == p.ssn;
}

// End of File