Copying strings and integers to arrays from an external file

Hello. I am trying to figure out how to copy information into 4 different parallel arrays from a text file.

This is an example chunk of the text file:

Zip Drive
89
Warehouse C
75.89
Keyboard
133
Warehouse C
25.95



I'm having trouble getting the integers to read into the array. The strings do however go into the arrays.

My 4 arrays are item[i], qty[i], location[i], and price[i] and my max array size is 30.

I am also required to use getline in order to make the full text line appear.

Like I said, the string lines come back okay. When an integer line comes up however, a very very small negative number appears (-600,000 something).

I was just wondering if someone could give me a nudge in the right direction on what it is I need to do.

Thank you
Seeing your code would help...
Topic archived. No new replies allowed.