提问者:小点点

C++无法打开源文件“time.h”


我正在尝试使用时钟来测量Visual Studio2015(x64)中运行程序的时间,使用C++在Windows上调试x64模式。

我在这些行中发现了错误:

#include <time.h>
#include <sys/timeb.h>

错误消息显示:

无法打开源文件“time.h”

无法打开源文件“sys/time.h”

要修复此错误,我必须添加什么路径才能包含目录?


共1个答案

匿名用户

您可以尝试#include

请参阅:http://www.cplusplus.com/reference/ctime/

使用的Time.h是C而不是C++。

相关问题


MySQL Query : SELECT * FROM v9_ask_question WHERE 1=1 AND question regexp '(c++|打开|源文件|time.h)' ORDER BY qid DESC LIMIT 20
MySQL Error : Got error 'repetition-operator operand invalid' from regexp
MySQL Errno : 1139
Message : Got error 'repetition-operator operand invalid' from regexp
Need Help?