I'm trying to read the txt file into my main program but I'm stuck trying to get it to read. So far I've already got the address but I don't know how to get the age. Line 5 is the age. Just in case you're wondering how I got the address, I used fscanf to get the address and put it into an array then I just glued the array together to form the address.
1 2 3 4 5
V's Place
123 Fake Street
Fake City, Fake State 12345
21
Probably you have already read age into array: you will read 11 elements and there is 10 in address part, so 11th time you will read age into addressdata[10]
I've just adjusted it to addressData[10] and it cuts off the zip code.
1 2 3 4 5
V's Place
123 Fake Street
Fake City, Fake State 12345
Age:21
fscanf(addressfile,"Age:%i",age);
Do you think it's possible to do this and get the age? I've already tried it but I didn't get the age. I'm not if that's legal.