how to create date class in c++