time函数

[复制链接]
查看11 | 回复2 | 2011-5-6 11:01:07 | 显示全部楼层 |阅读模式
#include
#include
#include
//#include
#include
using namespace std;
int main()
{

time_t t;
t=time(NULL);
cout
ANSI, Win 95, Win NT是定义在time.h中The time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time, according to the system
回复

使用道具 举报

千问 | 2011-5-6 11:01:07 | 显示全部楼层
应该只是警告,不是错误,试试这样:#include "time.h"#include "stdio.h"int main(void)
{
time_t lt;
lt =time(NULL);
printf("The Calendar Time now is %d\n",lt);
return 0;
回复

使用道具 举报

千问 | 2011-5-6 11:01:07 | 显示全部楼层
这是警告,你可以使用强制转换将这个警告去掉
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行