Saturday, August 6, 2011

Allocation for string?

Your problem is not the allocation, it's the if statement before it. If wordlist[dex] is not yet allocated memory then the strcmp function will fail(probably seg fault) because you are comparing temp with a null pointer.

No comments:

Post a Comment