当前位置: 代码迷 >> C语言 >> [求助]如何读取系统时钟
  详细解决方案

[求助]如何读取系统时钟

热度:168   发布时间:2006-04-17 17:35:00.0
[求助]如何读取系统时钟

各位高手:
  在下不才,不知如何在C语言或C++中读取出系统时钟来。肯请诸位帮助!
  谢谢!
hyqzchh@163.com

搜索更多相关的解决方案: 系统时钟  hyqzchh  C语言  

----------------解决方案--------------------------------------------------------
http://lehu.512j.com/3_huo4de2.htm

你自己去看
----------------解决方案--------------------------------------------------------
我试过了,不行
----------------解决方案--------------------------------------------------------
#include <stdio.h>
#include <dos.h>
int main(void)
{struct time t;
gettime(&t);
printf("The current time is:%2d:%02d:%02d.%02d",t.ti_hour,t.ti_min,t.ti_sec,t.ti_hund);
return 0;
}
将t.ti_hour,t.ti_min,t.ti_sec,t.ti_hund中逗号后面的空格去掉即可运行.
----------------解决方案--------------------------------------------------------
  相关解决方案