When checking the command line argument in Vigenere.c to see if it contains any non-alphabetic characters, I can't get my for loop to iterate past the first character. I have read all of the posts on here for the past 4 hours and still have not gotten anywhere. Please note that the code posted is not an attempt at the whole program, rather just trying to get the first step done correctly!
int main(int argc, string argv[])
{
if (argc != 2)
{
printf("You didn't enter one plaintext keyword!\n");
return 1;
}
else
{
for (int i = 0; i < strlen(argv[1]); i++)
{
if (!isalpha (argv[1][i]))
{
printf("Your keyword contained characters other than letters.\n");
return 1;
}
else
{
printf("Alpha\n");
return 0;
}
}
}
}