c++ error when use parallel_for <p>I'm trying to use parallel_for, but I get an error, the code is:</p> <pre><code>#include "stdafx.h" #include &lt;iostream&gt; #include &lt;windows.h&gt; #include &lt;ppl.h&gt; using namespace std; using namespace concurrency; int _tmain(int argc, _TCHAR* argv[]) { parallel_for(size_t(0), 50, [&amp;](size_t i) { cout &lt;&lt; i &lt;&lt; ","; } cout &lt;&lt; endl; getchar(); return 0; } </code></pre> <p>The error is:</p> <blockquote> <p>IntelliSense: no instance of overloaded function "parallel_for" matches the argument list >argument types are: (size_t, int, lambda []void (size_t i)->void</p> </blockquote> <p>This is only example, I have to use it in bigger project, but first of all I want to understand how to use it properly.</p> <p>*<strong><em>edit</em>*</strong></p> <p>i changed the code to:</p> <pre><code>parallel_for(size_t(0), 50, [&amp;](size_t i) { cout &lt;&lt; i &lt;&lt; ","; }); </code></pre> <p>but still i get the annoying error: IntelliSense: no instance of overloaded function "parallel_for" matches the argument list argument types are: (size_t, int, lambda []void (size_t i)->void)</p>