for (int j = 0; j<strlen(tmpStr); j++)
Why are you going through tmpStr? Isn't that simply the string you used on input? It has no bearing on your word list once input is done.
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 37
Of course. Read my previous post.
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 37
Then you still did something wrong. Since we can't see what has changed, we can't offer suggestions.
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 37
chPtrs[j] = new char[strlen(tmpStr)]; -- you forgot the extra character for the trailing \0
for (int j = 0; j<strlen(*chPtrs); j++) -- what is the value of strlen(*chPtrs)? Do you really want the string lenght of a pointer? Wouldn't the length of a string be more useful?
And in that loop, why are you outputting exactly 5 characters? LION only has 4 characters, BAT has 3, MONKEY has 6. I'd suggest another loop, using strlen() of the string you are outputting.
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 37