When the object name is directly transferred as a function parameter using the object name, a new object will be created during the function call, which is a copy of the object of the form parameter. = =====
# Include <iostream> using namespace std; class Time {public: Time (int, int, int); // constructor void Print (); // output information function void reset (Time t); // reset function private: int year; int month; int day ;}; Time: Time (int y, int m, int d) {year = y; month = m; day = d;} void Time: Print () {cout <year <"/" <month <"/" <day <endl;} void Time: reset (Time t) {t. year = 0; t. month = 0; t. day = 0 ;}int main () {Time t1 (12, 12, 12); // defines an object and initializes t1.Print (); // output t1.reset (t1) as the data member of t1; // reset t1.Print () as the data member of t1; // output return 0 as the data member of t1 ;}