title: Convert string to int with bool/fail in C++
body: <p>I have a <code>std::string</code> which could be a string or could be a value (such as <code>0</code>).</p>
  
  <p>What is the best or easiest way to convert the <code>std::string</code> to <code>int</code> with the ability to fail? I want a C++ version of C#'s <code>Int32.TryParse</code>.</p>