c++编程 制作一个时钟,可以显示小时 分 秒
#include?#include?class?Ctime?{private:std::vector?_val;const?static?int?_is60?=?60;std::vector&?calc_clock(?const?int&?v,?const?int?opt?=?0?)?{int?res?=?v?+?opt;_val.push_back(?res?%?_is60?);_val.push_back(?(res/_is60)?%?_is60?);_val.push_back(?(?res?-?_val[1]*_is60?-?_val[0]?)?/?(_is60*_is60)?);return?_val;public:Ctime?(?const?int&?v,?const?int?opt?=?0?)?{calc_clock(?v,?opt?);friend?std::ostream&?operator<