Question: C + + only Your job is to create a program that takes in a standard text ( . txt ) file and converts that

C++ only
Your job is to create a program that takes in a standard text (.txt) file and converts that to a CSV(.csv) file. Each item will be designated by an individual item per line in the text file. Well definewhen you should have a new line in the CSV file by an exit character: -1. So, assume each itemis moving horizontally in the CSV, until the exit character which will move the file down.So, the following sample text file:12-134-1Would be translated to a CSV file as:1,23,4Your program should, take in a base filename (WITHOUT AN EXTENSION), open that filenamewith .txt added and verify the existence in a loop. Once you have a valid file, read the contentsinto a vector and close the input file. Then, open an output file of the input filename with .csvadded and write the contents of the vector appropriately.Your program should end with the following files existing:filename.txtfilename.csvA couple sample text files have been provided to use.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!