Unscrambling words

Oct 30, 2015 at 6:14am
I have a lot of words in a notepad file. And another notepad file consist of a few words from that wordlist but scrambled.

I want to make a program in cpp using vectors.

I saw some old threads but i was not able to learn from that.

I don't want to be spoon fed. But please do help.
Oct 30, 2015 at 6:21am

Great. Everyone here loves to teach, or they wouldn't be here. Show us what you have so far.
Please remember to use code tags around your code so we can see the formatted version. Tell us where you are stuck and someone will jump in there to help you.
Oct 30, 2015 at 9:04am
closed account (48T7M4Gy)
Or if you just want to read a tutorial/reference material and sample programs you can run here try:
http://www.cplusplus.com/reference/vector/vector/vector/
Oct 30, 2015 at 11:16am
To compare scrambled/unscrambled words, sort both:

1
2
3
4
5
6
bool is_same_word( string word1, string word2 )
{
  sort( word1.begin(), word1.end() );
  sort( word2.begin(), word2.end() );
  return word1 == word2;
}
Topic archived. No new replies allowed.