
21 Jul
2004
21 Jul
'04
6:40 p.m.
How about clearer code:
//what does it do -- non-obvious date d; std::cout << d << std::endl;
//obvious... date d(not_a_date_time); std::cout << d << std::endl;
surely coding a default constructor does not prevent you from writing: date d (not_a_date_time); it just gives you the option of not doing so, eg. in generic code that requires a default constructor to be present, and anyway you can always comment those non-obvious lines of code for those who do not know how the library works. jonathan.