New 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]...


Top 50 recent answers are included