我正在尝试一个简单的程序来打印steady_clock的时间戳值,如下所示:
#include
#include
using namespace std;
int main ()
{
cout << "Hello World! ";
uint64_t now = duration_cast(steady_clock::now().time_since_epoch()).count();
cout<
return 0;
}
但每当我像这样g -o abc abc.cpp一样编译时,我总是收到一个错误:
In file included from /usr/include/c++/4.6/chrono:35:0,
from abc.cpp:2:
/usr/include/c++/4.6/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
abc.cpp: In function âint main()â:
abc.cpp:7:3: error: âuint64_tâ was not declared in this scope
abc.cpp:7:12: error: expected â;â before ânowâ
abc.cpp:8:22: error: ânowâ was not declared in this scope
我在做什么事吗?