Using the wording for your logic, modified just a little I came up with the following. Not compiled/tested.
Code:
1. The user enters in a series of letters.
string series;
cin >> series;
2. The program reads in a word from the wordlist.
ifstream fin("wordlist.txt");
string word;
int x = 0;
int y = 0;
int wordLength;
int seriesLength = series.length();
std::vector<string> wordsFound;
while(fin >> word)
{
wordLength = word.length();
for(x = 0; x < wordLength; ++x)
{
3. It checks to see if the first letter of the word read
in from the wordlist matches a letter in
the series of letters.
A. If the first letter of the word does not match with
the first letter in the string, check to see if the
first letter of the word matches the second letter of
the string, and so on until a match.
for(y = 0; y < seriesLength; ++y)
{
if(wordlist[x] == series[y])
break;
}
B. If the variable y equals the length of
the user input (effictively looking at and comparing all
of the user input with the current letter of the word),
then the word is not a permutation of the user input,
and you exit the outer loop
if(y == seriesLength)
break;
//else found this letter of word in the series of letters
//input by user so check for the next letter of word.
}
4. If all letters in word are found in series of user input letters then push the word into a vector
if(x == wordLen)
wordsFound.push_back(word);
}
5. check why input from file stopped
if(!file.eof())
cout << "error reading file" << endl;