check if the string is a number c++ code example
Example: c++ is string a number
bool isStringNumber(string str){
for(int i=0;i<str.length();i++){
if(str[i]<'0'||str[i]>'9'){
return false;
}
}
return true;
}
//Beleive in Allah!
//just my slogan
bool isStringNumber(string str){
for(int i=0;i<str.length();i++){
if(str[i]<'0'||str[i]>'9'){
return false;
}
}
return true;
}
//Beleive in Allah!
//just my slogan