#include #include #include "date.h" using namespace std; //Function declarations: void swap( int& a, int& b); void swap(double& a, double& b); void swap( date& a, date& b); int main() { int i {10}; int j {20}; ::swap(i, j); cout << "i = " << i << ", j = " << j << "\n"; double d {3.14}; double e {2.71}; ::swap(d, e); cout << "d = " << d << ", e = " << e << "\n"; date today; date tomorrow {today + 1}; ::swap(today, tomorrow); cout << "today = " << today << ", tomorrow = " << tomorrow << "\n"; return EXIT_SUCCESS; } void swap(int& a, int& b) { const int temp {a}; a = b; b = temp; } void swap(double& a, double& b) { const double temp {a}; a = b; b = temp; } void swap(date& a, date& b) { const date temp {a}; a = b; b = temp; }