#include #include #include "date.h" using namespace std; int main() { const date a[] = { date(date::july, 4, 1776), //Call the 3-argument constructor. date(date::october, 29, 1929), date(date::december, 7, 1941), date(date::july, 20, 1969), date(date::september, 11, 2001), date(), //Call the default constructor. date(a[5]) //Call the copy constructor. }; const size_t n = sizeof a / sizeof a[0]; for (size_t i = 0; i < n; ++i) { a[i].print(); cout << "\n"; } cout << "\n"; for (const date *p = a; p < a + n; ++p) { p->print(); cout << "\n"; } return EXIT_SUCCESS; }