#include<iostream>
#include<time.h>
using namespace std;
class TimeDate
{
public:
TimeDate(time_t t)
{systime=t;
};
void Show()
{
cout<<ctime(&systime);
};
private:
time_t systime;
};
main()
{
time_t x;
// x=time (NULL);
time (&x);
TimeDate ob(x);
ob.Show();
}
显示时间与日期
最新推荐文章于 2022-09-29 17:24:15 发布