c语言int64编译时错误,错误:编译C程序时未在此作用域中声明uint64_t

我正在尝试一个简单的程序来打印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

我在做什么事吗?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值