唐山大地震dvd:在C++中,怎么写代码,显示系统时间

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 04:17:07
写全点哦,谢谢大哥大姐啦!!

你直接查msdn的strtime 里面有这个例子:
#include <time.h>
#include <stdio.h>

void main( void )
{
char dbuffer [9];
char tbuffer [9];
_strdate( dbuffer );
printf( "The current date is %s \n", dbuffer );
_strtime( tbuffer );
printf( "The current time is %s \n", tbuffer );
}

#include<time.h>
#include<stdio.h>
void main( )
{
char strtime[20];
_strtime(strtime);
printf("time is:%s\n",strtime);
}

很全了!呵呵!