Hot answers tagged

1

This is a common newbie error. The problem lies here: isdigit(argv[1]) The isdigit() function and all of it's issomething() functions take a single char as input. But, argv[1] is a string, not a single char. This code is taking a string and shoving it down isdigit's throat, so it chokes and coughs up a seg fault. The code needs to check each char in argv[1]...


1

Have you actually tested the program with an invalid char, like a number, in the key? Try using the alphabet with a 2 instead of an a and see what it does. It should be incredibly obvious why the program "timed out" while check50 was waiting for it to end. The fix should be very obvious too. If not, leave a message. If this answers your question, ...


Only top voted, non community-wiki answers of a minimum length are eligible