This C++ date class is intended to illustrate how to write a non- trivial class in C++.

Elon Musk
Discover the mind behind the innovations – Elon Musk by Walter Isaacson, now on Audible. Dive into the life of a visionary shaping our future!
View on Amazon

Even though this class is non-trivial, it is still simple enough for a new C++ programmer to follow all of the details of the C++ program.  Initially the constructor sets the date to current date and format to 1. This class also makes use of #ifndef directive and DOS System calls to get the date.