18-07-2006, 22:29
|
|
|
חבר מתאריך: 01.01.02
הודעות: 960
|
|
אתה מנסה לקרוא מסוף הקובץ כבר .
אתה צריך להשתמש ב fseek ולעבור לתחילת הקובץ ואז תוכל לקרוא
כי הפרמטר a+ תמיד משאיר אחרי כתיבה את המצביע של הקובץ בסופו.
ציטוט מ MSDN
"When a file is opened with the "a" or "a+" access type, all write operations occur at the end of the file. The file pointer can be repositioned using fseek or rewind, but is always moved back to the end of the file before any write operation is carried out. Thus, existing data cannot be overwritten.
|