So title says it all, im trying to concatenate 3 wordlists together however for some reason it does not want to read the 3rd list,
first wordlist words:
nand
minus
second wordlist words:
nor
negative
third wordlist words:
xor
plus
void merge3(string MFile3)
{
string file1name, file2name,file3name, outfilename, word1, word2, word3;
cout << "Enter name of first file: ";
cin >> file1name;
cout << "Enter name of second file: ";
cin >> file2name;
cout << "Enter name of third file: ";
cin >> file3name;
cout << "Enter name of output file: ";
cin >> outfilename;
ofstream inFileFour(outfilename.c_str());
ifstream inFileOne(file1name.c_str());
while (inFileOne >> word1) {
ifstream inFileTwo(file2name.c_str());
while (inFileTwo >> word2) {
ifstream inFileThree(file2name.c_str());
while (inFileThree >> word3) {
inFileFour << word1 << word2 << word3 << endl;
}
inFileThree.close();
}
inFileTwo.close();
}
inFileOne.close();
inFileFour.close();
}
the wordlist with the errors, the first 2 word lists show but not 3rd one
the wordlist with all possible combinations expect with file
If anyone can let me know what is going on here that would be great, im open to suggestions.