Time firstTime;/*若写成Time firstTime();是不对的。默认构造函数的调用就是
Classclass;*/
Time secondTime(10,20,30);
display(secondTime);
return 0;
}
Eclipse C++ IDE for Linux编译器的输出结果: Time constructed!...... U have design hour, min, sec...... 10:20:30 Time deconstructed!...... Time deconstructed!......