int countDigits(string word)
{
int count = 0;
for (int i = 0; i < word.size(); i++)
{
if (word.at(i) < 57 && word.at(i) > 49)
{
count++;
}
}
}
i want to count the digits in a string "abc123". i know my problem is in the if statemnt i just cant get it working
stupid question i know im just stuck