Skip to content

My Latest Program

Here’s something I’ve been working on for a little while….

#include <mammal.h>

class Human : public Mammal
{

  friend Human &operator+(const Human &a, const Human &b)
  {
    return pro_create(a, b);
  }

}

int
main(int argc, char **argv){

  Human andrea();
  Human tim();
  Human x = tim + andrea;

  cout << x.dueDate() << endl; }

And the output …

falcon:~$ ./a.out
Thu Aug 9 00:00:00 MST 2007
falcon:~$