My professor has thrown me a curve ball with this next assignment. The assignment is to make a Monthly Accounting Statement, the program is to you structs and arrays. I get how you can have an array of structs, arrays within a struct, etc...
I have the program mapped out accept for this one part. When I reading in the customer names from the customer.txt file, some of the names have a middle initial, and some dont:
631502 Legg T. 2839 Lionel Ave. +16.30
180003 Hofstra M. 225 Smith Str -6.00
000963 Malioneyh P. J. 4344 Nero Rd +366.92
517724 Morier G. E. 19 Cumberland Ave +60.40
432649 Hauser M. 2940 Toronto Rd 0.00
817387 Currie W. D. 281 Harvard Str +55.00
913478 Hoos R. Dadie 821 County Road -100.00
713422 Smelly Tau 7281 Tobe Cir 0.00
Up until now, all the assignments have had entries similar, with a first and last name only so I just had to read through the file and put things in the appropriate place.
I'm not exactly sure how to go about this. I know it would have to be some kind of check. Do I need to fix the text file and make sure that there are tabs instead of spaces, and then do a check for that? I'm not even sure if my professor would allow me to change the .txt he gives us.