使用命名空间并发C++VS2010;没有具有该名称的命名空间

C++ VS2010 using namespace concurrency; No namespace with that name

本文关键字:命名空间 并发 C++VS2010      更新时间:2023-10-16

我尝试按照以下说明进行操作http://msdn.microsoft.com/en-us//library/vstudio/dd728073.aspx

我正在使用VS2010。

我在 CPP 文件中添加了以下行:

#include <windows.h>
#include <ppl.h>
#include <iostream>
#include <random>
using namespace concurrency;

但随后编译器告诉我"错误 C2871:'并发':不存在具有该名称的命名空间。

有人看到我做错了什么吗?谢谢!

太好了,在VS2010中它必须是

using namespace Concurrency;

相反。