title: strtod how to check if 0 is error or good value
body: <p>I would like to to convert string to double. I do that this way: </p>
  
  <pre><code>bool String2ValueType(const std::string &amp; a_str_value_type, double &amp; a_result)
  {
      if(a_str_value_type.empty())
          return false;
  
      char * end;
      double result = strtod(a_str_value_type.c_str(), &amp;end);
      if(*end!=NULL)
          return false;
      a_result = result;
      return true;
  }
  </code></pre>
  
  <p>How can I check if result is fine, or not, if it's value is 0?
  for example i will get 0 if I will send string("0"), and this is not error. 
  But I can also send some other string- that is number, but it will not be converted and I will get also 0 (error), ( I'm talking about case when *end == 0 ).</p>