This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fseek() question

I'm posting this question here since Keil's support haven't answered my email so far:
----------------------------------------
I have the following piece of code:

fH = fopen(FILE_NAME_CLOCK, "a");
fseek(fH,20,SEEK_SET);
fwrite(jbuf,1,sizeof(jbuf),fH);
fclose(fH);


It is supposed to write to position 20 right, but if you look at the attached file it appends the data to the end of the file. What am I missing or doing wrong or is it a bug?

PS: Using Keil's RTK file system and µVision3 V3.80 on a ARM7 from NXP.

Parents Reply Children