View Single Post
Old Apr 10th, 2005, 8:56 AM   #6
Hintshigen
Newbie
 
Join Date: Apr 2005
Posts: 6
Rep Power: 0 Hintshigen is on a distinguished road
Thanks, I got that part working now, I don't fully understand how to use fgets yet, a bit out of my league I think. I read a bunch of stuff I found on the net about it, but the best I could make out is that it reads from an already defined string. So the program is still using gets and scanf's.

Changing the array from 4 to 5 did help, though I don't understand why, if the array is set to 4 and registration number is limited to 4 characters a letter and three numbers. I thought it was like this

a234 <-- Four characters for the reg no
01234 <-- Array itself with space for a null terminator at the end

So why didn't that work, or am I thinking about this all wrong?

And massive thanks Rei, didn't even consider that it mighta been the array itself.
Hintshigen is offline   Reply With Quote