title: How to write lambda function with arguments? c++
body: <p>I want to call a method (for this example std::thread constructor) 
  with lambda function, passing int value:</p>
  
  <pre><code>int a=10;
  
  std::thread _testThread = thread([a](int _a){
    //do stuff using a or _a ?
  });
  _testThread.detach();
  </code></pre>
  
  <p>I don't know how to properly write such function, I get this error:
  C2064: term does not evaluate to a function taking 0 arguments</p>