I am having trouble passing a file into parallel arrays. Based on the code below, I get a bunch of jumbled numbers on my cout screen that don't even show up in the input file. I am at a loss :( Any help would REALLY be appreciated.
The input file is as follows:
ANDERSON
12
BROWN
4
CLARK
25
DAVIS
7
GARCIA
8
GONZALEZ
23
HARRIS
24
HERNANDEZ
15
JACKSON
18
JOHNSON
2
JONES
5
LEE
22
LOPEZ
21
MARTIN
17
MARTINEZ
11
MILLER
6
MOORE
16
RODRIGUEZ
9
SMITH
1
TAYLOR
13
THOMAS
14
THOMPSON
19
WHITE
20
WILLIAMS
3
WILSON
10
That'll hopefully make the issue known. Are u sure the .txt file is in the right location (ie: the same folder that the .exe is located) ? Else, with ur debugger u should break it at line 29 to see what ur variables are storing...because it should 'work' as is.