hi,
I set an array for making each chat in random that appear for my anagram game.But when it appear some of my char are the same wth other one.So it was useless.
EX like that
j h o p j n w g n o i e
in here the words j appear second time again in my words series and o also. may be it might be better to check not to repeat the words.So how can i do?
Another thing i let the program to check if the user use the character that not given in series or not in his words.
In case , the user use illegal words , my program let the user know .

And one more thing is if user cnt make the meaningful words from given word series,I lke to do the program to put out the possible words from my dictionary.txt that concerned wth my series words...
pls fix for me ..:mad: :p

in here the words j appear second time again in my words series and o also. may be it might be better to check not to repeat the words.So how can i do?

check the array to see if the char is already in it. If not, add it to the array, otherwise if its already there then just generate another random char.

check the array to see if the char is already in it. If not, add it to the array, otherwise if its already there then just generate another random char.

huh ,
I cnt do it ..

Well post your latest effort, and then perhaps we can help you solve the problem.

Are you using C-Style char arrays for your strings, or std::string strings from C++ ?

Well post your latest effort, and then perhaps we can help you solve the problem.

Are you using C-Style char arrays for your strings, or std::string strings from C++ ?

Give me some code pls..Do u have mail to chat?

That's a far more complex solution to the op's problem than it needs to be. There is a pretty simple solution that takes only a few lines of code. Just think about loops and how to search an array for a certain value.

>That's a far more complex solution to the op's problem than it needs to be.

Oh I didn't write that in MFC ;)

And he did say:

And one more thing is if user cnt make the meaningful words from given word series,I lke to do the program to put out the possible words from my dictionary.txt that concerned wth my series words...

But that may be quite some time away before they get to that stage.

This article has been dead for over six months. Start a new discussion instead.