1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > c语言中TR1=1什么意思 c – 如何在Visual Studio (tr1 :: function)中使用tr1?

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

时间:2019-02-19 08:41:23

相关推荐

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

如何开始使用Visual Studio 的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 ';'

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。