如何“激活” c ++ 11标准在visual studio 2010? [英] How to "activate" c++11 standard in visual studio 2010?

查看:132
本文介绍了如何“激活” c ++ 11标准在visual studio 2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的c ++编程,我需要使用Thread类在我的VS 2010项目。
我发现这个参考,但当我尝试以下:

I am new to c++ programming and I need to use the Thread class in my VS 2010 project. I've found this reference, but when I try the following:

#include <thread>

VS 2010明显告诉我'错误:无法打开源文件线程。我明白我需要激活c ++ 11标准不知何故。我不知道从哪里开始。

VS 2010 obviously tells me 'Error: cannot open source file "thread"'. I understand that I need to "activate" c++11 standard somehow. I do not even know where to start.

那么在visual studio 2010中使用()c ++ 11标准应该怎么办?

So what should I do to use () c++11 standard in visual studio 2010?

推荐答案

std :: thread 显然不在VS 2010。我认为它添加了VS 2012 ,也受此问题和答案支持。 。是否有任何特定的原因,你使用2010而不是最新版本,2013,它支持更多的C ++ 11部分?

std::thread is obviously not in VS 2010. I think it was added with VS 2012, which is also supported by this question and answer. Is there any specific reason you're using 2010 rather than the latest version, 2013, which supports far more part of C++11?

还要注意: GCC,MSVC没有选择加入较新的标准。它只是支持他们开箱即用实现。

Also to note: Contrary to GCC, MSVC doesn't have an "opt-in" for newer standards. It just supports them out of the box as far as implemented.

这篇关于如何“激活” c ++ 11标准在visual studio 2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆