Write a word search program that searches an input data file for a word specified by the
Question:
Write a word search program that searches an input data file for a word specified by the user. The program should display the number of times the word appears in the input data file. In addition, the program should count and display the number of characters in the input data file that are not vowels. Your program must do this by providing the following functions :
void processFile(ifstream inFile, string &word, int &wordCount, int &nonVowelCount) ;
void displayResult(string word, int wordCount, int nonVowelCount) ;
Both functions should be called from main(). No non-constant global variables should be used.
Test your program using the file provided “paragraph.dat”. (name the file paragraph.dat)
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen