#include #include #include "date.h" using namespace std; int main() { date a[] { { 1, 16, 2025}, //three arguments for the constructor { 1, 23, 2025}, { 1, 30, 2025}, { 2, 6, 2025}, { 2, 13, 2025}, { 2, 20, 2025}, { 2, 27, 2025}, { 3, 6, 2025}, { 3, 13, 2025}, { 3, 27, 2025}, { 4, 3, 2025}, { 4, 10, 2025}, { 4, 27, 2025}, { 5, 1, 2025}, { 5, 8, 2025} }; const size_t n {size(a)}; //the number of elements in the array //Loop through the array with an int i for (int i {0}; i < n; ++i) { a[i].print(); //Call the print member function of a[i] cout << "\n"; } cout << "\n"; //Skip a line. //Loop through the array with a pointer p for (const date *p {a}; p < a+n; ++p) { //a means &a[0]; a+n means &a[n] p->print(); //Call the print member function of the object ... cout << "\n"; //... that p points to. } return EXIT_SUCCESS; }