strcmp refuses to work [closed]

First off, you’re allocating a lot of arrays in local variables in main(). That could lead to a stack overflow. You should probably use malloc() to allocate them instead.

Second, this line is an assignment, not a comparison, which is a bug:

if (succ = 0)

Change it to this, if you want it to be a comparison:

if (succ == 0)

Third, you’re not initializing succ at the beginning of main() which is a bug.

If I see anything else suspect I’ll update my answer. But start with fixing those issues.

Leave a Comment