找不到c++时间戳标识符
c++ time stamp identifier not found
我试图获得一个时间戳来显示系统提供的日期和时间。我得到'时间,'asctime'和'localtime'的错误-未找到标识符。我认为这应该是一个容易的解决方案,但我是一个新手程序员和超越卡住。谢谢!
#include <iostream>
using namespace std;
int main()
{
cout << "Content-type: text/htmlnn";
cout << "<center><h1>TEST</h1>n";
return 0;
time_t tTime = time(NULL);
printf("Today is : %sn", asctime(localtime(&tTime)));
}
您忘记添加#include <time.h>
了吗?
相关文章:
- C++:floor unix时间戳到UTC月份
- 如何在c++中录制具有精确帧时间戳的视频
- 在两台机器之间进行时间戳的最佳c++chrono函数是什么
- Google protobuf 时间戳未声明标识符,在 Windows 上具有C++
- 在多个时间戳处执行函数
- 以天C++为单位的两个时间戳之间的差异
- 获取 QInputEvent 在 Qt 4.8 中被放入 QEventLoop 队列时的时间戳
- 在 C++ 中为文件名添加时间戳
- 如何从远程 SFTP 服务器获取 HH-MM-SS 时间戳格式的文件列表
- 如何将消息时间戳写入日志文件?
- 将时间戳打印到流的最简单方法
- 读取悖论时间戳字段
- C++程序中多个位置的时间 (0) 时间戳
- 在 c++ 中获取 X 毫秒前的时间戳
- 将 unix 时间戳转换为人类可读的日期
- Microsoft NTLM (v2) 中的时间戳使用
- C++中上周一的时间戳
- C++-需要读取存储在文件(.txt)中的时间戳并正确检索
- 使用 C++将时间戳转换为格式化的日期时间
- 找不到c++时间戳标识符