I am getting this error: expression result unused
and I don't know what that means. I use the code it's pointing to (green underline), just like I do in my Caesar cipher which works:
The other posts on here about this error are not helping me, because my code seems to be correct (to me).
Here is a portion of my code:
string key = argv[1];
string plain_text = GetString();
int n = strlen(plain_text);
int m = strlen(key);
for (int i = 0, j = 0; i < n, j < m; i++, j++)
{
if (islower(plain_text[i]) && isalpha(plain_text[i]))
{
// Change ASCII to alphabet, apply wrap formula, then back to ASCII
plain_text[i] = (((plain_text[i] - 'a') + (key[j] - 'a')) % 26) + 'a';
}
else if (isupper(plain_text[i]) && isalpha(plain_text[i]))
{
// Change ASCII to alphabet, apply wrap formula, then back to ASCII
plain_text[i] = (((plain_text[i] - 'A') + (key[j] - 'A')) % 26) + 'A';
}
} // End of for loop