So I am using a for loop to pull the specific chars from the key string. Whenever I use a key with the letter "a" or "A", the loop stops. I am using the for loop to pull the char and index with a simple function like this:
#define lowerindex 97
string k = argv[1];
for (int j = 0; j < strlen(k); j++)
{
if(isalpha(k[j])
{
if(islower(k[j])
{
k[j] = k[j] - lowerindex;
}
...
My guess is that the way I am doing this will return 0 when I get to a letter 'a', but shouldn't it just give it that value '0' to use later rather than terminating the loop?