Question: file search (make it simple) DESCRIPTION Create a program named FileSearch.cpp, that prompts to user for a file name and a value to search for.
DESCRIPTION Create a program named FileSearch.cpp, that prompts to user for a file name and a value to search for. The program then displays a message indicating if the value is present in the file. The search value can be a word, number, or anything that doesn't contain spaces The following examples are what should be displayed if there is a file named input.txt, with the following content But I will sing of your strength and will joyfully proclaim your faithful love in the morning. For you have been a stronghold for me, a refuge in my day of trouble. Psalm 59:16 CSB Sample Output (user input is in yellow) Enter the name of the file: input.txt Enter a value to search for: stronghold "stronghold" was found in "input.txt". Sample Output (user input is in yellow) Enter the name of the file: input.txt Enter a value to search for: STRONGHOLD "STRONGHOLD" was not found in "input.txt". Sample Output (user input is in yellow) Enter the name of the file: input Could not open "input". Submit only your source file named FileSearch.cpp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
