#include <iostream> #include "diary2.h" using namespace std; diary::diary(const char *e,int y,int m,int d) : date(y,m,d),event(e) { } diary::diary(const char *e, const char *d) : date(d), event(e) { } diary::diary(const char *e, const date& dd ) : date(dd), event(e) { } void diary::print( ostream& os) const { list::print(os); os << ", "; date::print(os); os << ", "; os << event; } ostream& operator<<( ostream& os, const diary& d) // no cpy constr { d.print(os); return os; }