Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 timestamp() 函数。但我不知道它是在哪个标头中定义的。我试过了,但是里面没有。编译时出现错误,如下所示
error: ‘timestamp’ was not declared in this scope
没有标准timestamp()功能。如果要使用std::time(),可以包含<ctime>标题。
timestamp()
std::time()
<ctime>
做一个简单的搜索:
grep 时间戳 *.h
或递归:
grep -r 时间戳。
(这适用于类 unix 系统;如果您使用 Windows 或其他东西,请进行调整)