Your issue is that you are only using the first letter of the key.
int k = shift (key);
You need to use each subsequent letter as you move along ciphering the plaintext. That is the challenge with vigenere versus caesar.
I assume the % strlen(key) is causing some type conversion.
Your logic is wrong. First iterate the key to ensure all characters are alphabetic, and maybe also uppercase the key there if you want. Then, after the first loop, iterate the plaintext, keeping a separate index for the key that you increment on encrypting a letter only. Separate loops.
Instead of printing non-alphas without encoding them, this code is printing the next encoded letter for each preceeding non-alpha. In other words, if the key was a (meaning don't encode, just echo everything), and the string was b12c . de it would print bcccdddde. While I've never seen this effect, the problem is a common one. The index for the key, j, is ...
Your instincts are more or less correct. You have actually declared key twice, once as a global and a second time as a local var inside main(). Specifically, the line int key = atoi(argv); is the second declaration and it takes precedence over the global var, so any usage of key inside of main will use the local version.
The actual error is that once ...
string keyword = argv; will work because you are assigning the address of string argv to keyword. You can now treat keyword as a char array and access the individual characters as keyword[i].
You could also do this:
Instead of keyword pointing at the same memory location as argv, this ...