Question: A code snippet is given below as well as the text file for which it opens. The code snippet is line in the things.txt file
A code snippet is given below as well as the text file for which it opens. The code snippet is line in the things.txt file represents an item, and the file opens properly. Why does the code snippet not achieve the desired result? By editing the code below show how 6. m in the things array. Assume each the program can be fixed. (8 Points) string things [10]; ifstream file; file.open("things.txt"); if (Ifile.is open()) return e; inti e; while (file.good()) file things [i]: file.close); Code Snippet hammer chisel electric drill screws things.txt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
