You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error is in the updated code. Corrected code, string_utilities.cc:54 is:
{
// Scan the c_string str for numbers only, then return the value as a float.
// The str is not allowed to have spaces or alphanumerics, only 0-9 and .
int i=0;
// while(char c=str[i++]) if((isalpha(c) || ispunct(c) || iscntrl(c) || isspace(c)) && !(c=='-' || c=='+' || c=='e' || c=='E') )
while(char c=str[i++]) if(!(isdigit(c) || c=='-' || c=='+' || c=='e' || c=='E' || c=='.'))
{
cout << "WARNING: Unexpected character found in number string: " << str << endl;
cout << "Exiting " << endl; exit(1);
}
return( stringToDouble(str));
}
The text was updated successfully, but these errors were encountered:
{
// Scan the c_string str for numbers only, then return the value as a float.
// The str is not allowed to have spaces or alphanumerics, only 0-9 and .
int i=0;
while(char c=str[i++]) if(isalpha(c) && !(c=='-' || c=='+' || c=='e' || c=='E') )
{
cout << "WARNING: Unexpected Alphanumberic character found in number string:" << str << endl;
}
return( stringToDouble(str));
}
Error is in the updated code. Corrected code, string_utilities.cc:54 is:
The text was updated successfully, but these errors were encountered: