如何将数据时间设置为方法中的参数

how to set data time as a parameter in a method?

本文关键字:方法 参数 设置 数据 时间      更新时间:2023-10-16

HI,

我有一个方法,需要包含一个数据时间作为参数。我该怎么写?string data_time(c_time time); ? is it correct?.

其次是:

 string data_time(c_time time)
{
 i would like to save the hour, second, minute, month and year in different string values. how to do this? need some help. i am working in ubuntu.. thx
} 

为什么不使用'ctime'模块中的'time_t'?示例:一个、两个、三个