c语言中TR1=1什么意思,c – 如何在Visual Studio 2010(tr1 :: function)中使用tr1?

如何开始使用Visual Studio 2010的tr1功能?对于更具体的情况,我需要std :: tr1 :: function.我试过包括#include< tr1 / functional>报告为缺失,而#include< functional>包括罚款,但当我设置这个:

std::tr1::function callback;

我明白了:

1>d:\marmalade\projects\core\src\button.h(21): error C3083: 'tr1': the symbol to the left of a '::' must be a type

1>d:\marmalade\projects\core\src\button.h(21): error C2039: 'function' : is not a member of '_STL'

1>d:\marmalade\projects\core\src\button.h(21): error C2143: syntax error : missing ';' before '

1>d:\marmalade\projects\core\src\button.h(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>d:\marmalade\projects\core\src\button.h(21): error C2238: unexpected token(s) preceding ';'

如果我使用boost,它工作正常,但对于这个项目,由于使用特定的框架,我需要Visual Studio tr1版本.

正如所建议的那样,跳过tr1仍会返回相同的结果:

std::function callback;

1>d:\marmalade\projects\core\src\button.h(20): error C2039: 'function' : is not a member of '_STL'

1>d:\marmalade\projects\core\src\button.h(20): error C2143: syntax error : missing ';' before '

1>d:\marmalade\projects\core\src\button.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>d:\marmalade\projects\core\src\button.h(20): error C2238: unexpected token(s) preceding ';'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值