所以我使用atof将我的字符串转换为double.但是我需要知道输入是否错误(如y564等).我怎么检查呢?我需要正确的号码才能进一步采取行动.
double x = atof(s.c_str());
c++ string double atof
atof ×1
c++ ×1
double ×1
string ×1