I'm having trouble verifying the
argv keyword along the guidelines of the assignment.
I've tried to implement an
if ... else statement the checks if
argc is 2 and
argv is alpha, if so, run the cipher, otherwise
return 1. The problem was twofold:
- When I had the
if ... elsethere, the cipher wouldn't work with check50, even though it would without the cipher. It gave the error: "
expected prompt for input, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 7 (or 6 depending on the input in check50)...""
isalphadoesn't work with strings, and the implementation of a
forloop made the rest of the verification not work. The errors in check50 with this implemented are, for the cipher checks, it automatically exiting with 0, and for the lack of
argv, it's "
expected output, not standard error of "/opt/sandbox50/bin/run.sh: line 31: 208...""
So, am I on the right track? Is there a function like
isalpha that works with strings? What exactly am I doing wrong?