IT doesn't enter second loop don't know why. Any suggestion?
Yep.
Split for(int k=0; k<getphraselength(); k++) into 2 statements. What call the function every time you go through the loop? Make it:
len = getphraselength();
for(int k=0; k<len; k++)
Now you can displaylen and see if the value lets the loop run.
In general, don't call functions in the parameters of the for if you can help it.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944