#include #include using namespace std; class date { int year; int month; int day; public: date(int m, int d, int y); //Declarations of member functions void print() const; }; date::date(int m, int d, int y) //Definitions of member functions : year {y}, month {m}, day {d} { } void date::print() const { cout << month << "/" << day << "/" << year; } int main() { date d {2, 20, 2025}; date *p {&d}; //p holds the address of d, i.e., p points to d. d.print(); cout << "\n"; //Two ways to do the same thing (calling the print member function //of the object that p points to). The second way is easier. (*p).print(); cout << "\n"; p->print(); cout << "\n"; return EXIT_SUCCESS; }