一事相求

wujunwei 2002-02-22 12:10:43
请问高手门怎样在c(tc2.0)中显示系统时间,我找了很多书都找不到啊
...全文
67 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lemon-sai 2002-02-22
  • 打赏
  • 举报
回复
ctime: converts date and time to a string

char *ctime(const time_t *time);

Prototype in time.h

Returns a pointer to the character string
containing the date and time. This string
is a static variable that is overwritten
with each call.
Lemon-sai 2002-02-22
  • 打赏
  • 举报
回复
localtime: converts date and time to a
structure

struct tm *localtime(const time_t *timer);

Prototype in time.h

Returns the broken-down time structure,
which is a static that is overwritten with
each call.

Lemon-sai 2002-02-22
  • 打赏
  • 举报
回复
应该是在time.h里,然后用Ctrl+F1自己找找吧,相关的函数都有注释的
wujunwei 2002-02-22
  • 打赏
  • 举报
回复
thank you

69,373

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧