Its been a while since I've coded, so I apologise if this is a stupid mistake, but I'm having a problem reading in a file. it gets to the end of the 1st loop and hangs, I dont know if its because of the string array I'm using, but I cant figure it out.
APN
45.07 83.57 E
ATL
33.65 84.42 E
DCA
38.85 77.03 E
DEN
39.75 104.87 M
DFW
32.90 97.03 C
DTW
42.23 83.33 E
GRR
42.88 85.52 E
JFK
40.65 73.78 E
LAF
40.42 86.93 E
LAN
42.77 84.60 E
LAX
33.93 118.40 P
MBS
43.53 84.08 E
MIA
25.82 80.28 E
MQT
46.53 87.55 E
ORD
41.98 87.90 C
SSM
46.47 84.37 E
TVC
44.73 85.58 E
YYZ
43.67 79.63 E
Change line 24 to fileRead(code, lat, lon, zone);. Your code doesn't work because you don't pass array to function. With &code[NUM_OF_CITIES] you are passing address of 18th element of the array.