title: Convert string to int in C++ and test is successful
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7663709/convert-string-to-int-c">Convert string to int C++</a><br>
    <a href="https://stackoverflow.com/questions/13742761/whats-the-fastest-way-to-check-if-a-string-is-a-number">What’s the fastest way to check if a string is a number?</a>  </p>
  </blockquote>
  
  
  
  <p>I need to convert string to int and I need to know if converting was successful. But number can be zero, so I can't use <strong>atoi</strong> and others. String to convert I read from file. </p>