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

时间:2011-05-25 13:37:09

标签: c++ ubuntu

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
} 

1 个答案:

答案 0 :(得分:0)

为什么不使用'ctime'模块中的'time_t'?示例:onetwothree