Question: Use the following given Examples and Hints! C++ only! 6.9 Lab: Word Filter In this lab you will write a program that reads in a
Use the following given Examples and Hints! C++ only!

6.9 Lab: Word Filter In this lab you will write a program that reads in a text tile containing a list of words, and writes two text files; one containing words with an even numiber of characters, the other containing words with an cdd nuriber of characters The program should begin by prompting the user for the name of the input file Validate the filename to make sure it ends in.txt. If it does nct, re prompt the user after printing an informative message. For example: Enter the na of the input file: wozds.dec Only filenames ending in '.txt' are accepted! Enter the name of the input file: The program should attempt to open the file for reading If there is an error (for example, if the file does not exist), then the program should output an error message and exit (by returning 1 from main). For example Enter the name of the input rile: no such file.txt Failed to open file for road: no such filo.txt Assurriing the file opens successfully, the program should prepare the two output files. These files should be named:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
