I'm stuck on Vigenere Cipher in pset2. I have everything working with the key and the cipher text until I need to wraparound back to the beginning of the keyword. I watched Zamyla's walk through. I understand that I need to use the modulus operator on the index of the keyword to make the shift. I do not know exactly how and where to use the modulus operator. I was thinking of adding something like the following with modulus but syntax is a weak point for me so I have been struggling with this for hours.
int currentkey = key[j];
int keylength = strlen(argv);
if (currentkey == keylength)
key[j] = currentkey % keylength;