/* Tom Orzechowski orzecht1@lasalle.edu CSC 162 Assignment 5- Using the string library (and using an existing class) This is the main program that will utilize the WordMatrix class. */ #include #include "WordMatrix.h" #include bool searchstring(string word, string search, bool rows, int rowcol){ /* this function searches for word in a string and the reverse of the string */ string reverse=search; //the reverse of the string to be searched in int x=0; //counter variable int y=0; for(x=search.length()-1; x>=0; x--){ reverse[y]=search[x]; y++; } int position; position=search.find(word);//searches for word in string if(position>=0){ if(rows)//displays when word is found cout<<"Starts at Row "<=0){ if(rows)//displays when word is found cout<<"Starts at Row "<=0; x--){ reverse[y]=search[x]; y++; } int position; position=search.find(word);//searches for word in string if(position>=0){ if(right)//displays when word is found cout<<"Starts at Row "<=0){ if(right)//displays when word is found cout<<"Starts at Row "<