1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
int main()
{
//Reading in the two required files
ifstream infiletxt1("C:\\Users\\jackf\\Desktop\\Programming Assignment 2(New)\\text1.txt");
ifstream infilesearch1("C:\\Users\\jackf\\Desktop\\Programming Assignment 2(New)\\search1.txt");
string text1Array[14];
string search1Array[18];
string foundWords[18];
string word1[3] = {"d","o","g"};
string word2[3] = { "p","i","g" };
string word3[3] = { "c","a","t" };
string word4[3] = { "r","a","t" };
string word5[3] = { "f","o","x" };
string word6[3] = { "c","o","w" };
readFileText1(infiletxt1, text1Array);
cout << "" << endl;
readFileSearch1(infilesearch1, search1Array);
outputArraySize14(text1Array);
cout << "" << endl;
outputArraySize18(search1Array);
cout << "" << endl;
system("pause");
system("CLS");
cout << "Begin Searching for words:" << endl;
system("pause");
system("CLS");
compareArray(text1Array, search1Array, foundWords);
searchForFound(foundWords, text1Array, word1, word2, word3, word4, word5, word6);
system("pause");
system("CLS");
}
|