Code:
lyx certainly seems to know his/her stuff. As an alternative, instead of trying to do everything in a single constructor like this:
Date(const int = 1, const int = 1, const int = 1900);
and getting tripped up as lyx described you could try this combination as an alternative to the solutions lyx described:
//default constructor to initialize data members with default values
Date() : month(1), day(1), year(1900)
{}
//in combination with a three int constructor to allow user input
Date(int m, int d, int y) : month(m), day(d), year(y)
{}
//and then the routine syntax for the << operator, inlined here
//for simplicity sake
friend ofstream &operator<<(ofstream& stream, const Date& d)
{
stream << d.month << '|' << d.day << '|' << d.year << '|';
return stream;
}