This is a C++ program Problem: In this project, you are tasked with developing a console-based text-editor. The required functionalities for your text-editor are as follows: 1. View contents of the user-specified text file 2. Create a new text file 3. Write text to the user-specified text file 4. Add/append text to the user-specified text file 5. Search for a word in the user-specified text file 6. Replace an existing word with another word in the user-specified text file Instructions: At the start of your program, it should display a menu listing possible choices for the user which should highlight various features of your text-editor. Depending on the user’s choice, your program should run the appropriate task and display appropriate messages. Once the task is complete, your program must return to the main menu. In case of an error, your program must gracefully handle the error (for instance, if the specified text file does not exist, your program should display an appropriate error message and return to the main menu). You are NOT required to use any graphical elements in your program. Hints: 1. To search for a word in a line of text, you may use the find() function that works with C++ string objects. Quick reference: https://www.javatpoint.com/cpp-string-find-function 2. While implementing the search and replace functionality, you may need to make a temporary copy of the text file.
Oh no! Our experts couldn't answer your question.
Don't worry! We won't leave you hanging. Plus, we're giving you back one question for the inconvenience.
This is a C++ program
Problem:
In this project, you are tasked with developing a console-based text-editor. The
required functionalities for your text-editor are as follows:
1. View contents of the user-specified text file
2. Create a new text file
3. Write text to the user-specified text file
4. Add/append text to the user-specified text file
5. Search for a word in the user-specified text file
6. Replace an existing word with another word in the user-specified text file
Instructions:
At the start of your program, it should display a menu listing possible choices for
the user which should highlight various features of your text-editor. Depending on the
user’s choice, your program should run the appropriate task and display appropriate
messages. Once the task is complete, your program must return to the main menu.
In case of an error, your program must gracefully handle the error (for instance, if
the specified text file does not exist, your program should display an appropriate error
message and return to the main menu).
You are NOT required to use any graphical elements in your program.
Hints:
1. To search for a word in a line of text, you may use the find() function that
works with C++ string objects.
Quick reference: https://www.javatpoint.com/cpp-string-find-function
2. While implementing the search and replace functionality, you may need to
make a temporary copy of the text file.