Question: C++ program that takes input file, removes blank lines, numbers the contents, and outputs how many lines were processed along with new file. I have
C++ program that takes input file, removes blank lines, numbers the contents, and outputs how many lines were processed along with new file. I have attached MY NON WORKING ATTEMPT but I think it is close. The main function can't be modified. Thank you!

My non working attempt:
#include #include #include #include using namespace std; void get_input_output_streams(ifstream& in_stream, ofstream& out_stream); //function header void number_file(ifstream& in_stream, ofstream& out_stream); //function header int main(){ //main ifstream in_stream; ofstream out_stream; get_input_output_streams(in_stream, out_stream); //function call number_file(in_stream, out_stream); //function call return EXIT_SUCCESS; } void get_input_output_streams(ifstream& in_stream, ofstream& out_stream){ string data; //what is inside the file string InFileName; //Input File name string OutFileName; //Output File name cout > InFileName; cout > OutFileName; //in_stream.open(InFileName.c_str()); //Check to see if input file will open // if(in_stream.fail()){ // cout objectives: Use input and output files, use the getline function, use reference parameters. Write a C++ program that adds line numbers to a text file. The program should ask the user for an input text file name to be numbered and an output file name. Your program should ignore blank lines. The file should be copied to an output file with all the lines numbered as shown below. Display a message on the screen showing the number of lines processed. In the example below it should output the message: 3 lines processed Requirement: Write a function that asks the user for the two file names, opens the files, and returns the input and output streams to the main program. Write a function to process the input file and produces the output file. Use the following main program int main 0 ifstream in stream; ofstream out stream get input output streams in stream, out stream); number file in stream, out stream); return EXIT SUCCESS; Hints: Use the function getline to read one line at a time. Streams are always passed by reference A blank line will be an empty string Example: louputFi Input file 1: George Washington George Washington 2: Abraham Lincoln 3: Thomas Jefferson Abraham Lincoln Thomas Jefferson