// Code derived from Stroustrup's PPP2 book// § 9.4.3 Keep details private// -and beginning on p 312// simple Date:// guarantee initialization with constructor// provide some notational conveniencestructDate{Date(inty,intm,intd);// check for valid date and initializevoidadd_day(intn);// increase the Date by n daysinty,m,d;// year, month, day};Date::Date(inty,intm,intd):y{y},m{m},d{d}{}intmain(){Datebirthday{1960,12,31};// December 31, 1960++birthday.d;// ouch! Invalid date// (birthday.d==32 makes birthday invalid)Datetoday{1970,2,3};today.m=14;// ouch! Invalid date (today.m==14 makes today invalid)}