I am using the following to indicate that if a number is used as the command line argument in vigenere to prompt the user for letters only but I can't wrap my mind around how this takes into account all numbers?
if(isalpha(argv[i]) == 0)
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.Sign up to join this community
Presumably, you have that in a loop that is looping over the length of
argv. So if the user typed:
argv would equal
"abc123" and your loop first time round would be checking
if (isalpha(argv) == 0)
isalpha('a') //true isalpha('b') //true isalpha('c') //true isalpha('1') //false so yell at user and return 1.
Is this what you meant?