Reading data from file | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Reading data from file

https://code.sololearn.com/cSLT1yjG7SZN/?ref=app This is my code so far and it’s quite bare. I need help on reading data from a file that is given to me which is called “Agencies.txt” . The assignment is this: — Ask the user for the input file name. Then, read ALL data from that file (the file has been structured where the first line is the Car Agency info, followed by 5 cars). The data have to be stored into arrays of Class type Objects. I’ve already started the function for it and I don’t know how to finish it. Thank you

14th Feb 2019, 12:53 AM
lakas
1 Answer
+ 2
I have made the necessary changes into the file: I hope it will work now: plz check https://code.sololearn.com/cot2NkN3ob89/?ref=app
27th Feb 2019, 9:43 AM
Sinjini Das
Sinjini Das - avatar