Getting this segmentation error for inproper use of isdigit in my If statement, i just don't know how else to check argv[1] for numerical value as opposed to alphabetical.
int main(int argc, string argv[]) {
if ((argc == 2 ) && (isdigit(argv[1]) == 0)) // if isdigit returns 0 then the key inputted is a digit
{
int key = atoi(argv[1]); // converting a string to int and taking the array position 1 from the command line argument and making the value usable
plaintext = get_string("plaintext: "); //input string stored in "plaintext"
printf("ciphertext: ");
for (int i = 0, len = strlen(plaintext); i < len; i++) // assigning a position to the characters in the plaintext string