Im trying to declare a new function to use in vigenere, I want to create a function that will check if an entire string is alphabetical (not just a single character in a string which is what the isalpha() function does). I'll paste my code below, but what I'm really stuck on is getting the function to return a 1 true or false after I've checked all characters in the string.: int main(int argc, string argv[]) { if (argc == 2) { bool sisalpha(string a, int i, char a[i]);
bool sisalpha(string a, int i, int n, char a[i])
{
for (i = 0, n = strlen(a); i < n; i++)
if (isalpha(a[i]))
{
return true;
}
else
{
return false;
}
Let me know if you have any suggestions!