// Code derived from Stroustrup's PPP2 book// § 9.4.4 Defining member functions// -and beginning on p 315#include<iostream>usingnamespacestd;// simple Date (some people prefer implementation details last)classDate{public:// We can also define member functions right in the class definitionDate(intyy,intmm,intdd):y{yy},m{mm},d{dd}{// . . .cout<<y<<m<<d<<'\n';// rm's 'unused variable' error}voidadd_day([[maybe_unused]]intn){// . . .}intmonth(){returnm;}// . . .private:inty,m,d;// year, month, day};intmain(){Datesunday{2004,8,29};// initialize sunday with {2004, 8, 29}sunday.add_day(7);// skip 7 daysreturnsunday.month();// get sunday's month}