#include #include #include "date.h" using namespace std; int main() { double pi = 3.14159265358979323846; int i = pi; //convert double to int cout << pi << " converted to int is " << i << "\n" << pi << " converted to int is " << static_cast(pi) << "\n\n"; date d; i = d; //int i = d.operator int(); d.print(); cout << " converted to int is " << i << "\n"; d.print(); cout << " converted to int is " << static_cast(d) //<< d.operator int() << "\n"; return EXIT_SUCCESS; }