Having trouble reading information from a text file to parallel arrays. The info is arranged as such in the file:
Name
Street Address
City, State, Zip
Order size
Name
Street Address
City, State, Zip
Order size
Basically I need to pull the names, street address, and city/state/zip as lines into string arrays and then pull the order size into an int array to do some calculations. Grand total of 4 arrays.
Problem is it'll read the first order just fine, but the second order looks like
John Doe
123
Main Street
City, State Zipcode
9
0
9
9
4679937
9
0
9
9
4710208
Actually got this figured out on Stack. The solution is to use getline 5x (4 with data, one blank) and then convert the 4th string into an int for calculations.
I'll leave this here in case anyone has a similar problem.