The information in this article applies to:
SUMMARYWhen data need to be appended to a stream file that is terminated with the CTRL+Z end-of-file (EOF) marker (ASCII 1Ah), use fopen() with an access mode of "a+" to open the stream. This will ensure that all data appended to the stream are accessible after the stream is closed. MORE INFORMATION
If fopen() is called with the "a+" mode, the operations of reading
from and writing to the opened stream file are valid. Before any
data are appended, the C Run-time reads the file and deletes the
end-of-file marker. However, if fopen() is called with the "a"
mode, only the operation of writing to the opened file is valid. The
C Run-time must seek to the end of the file and append characters
after the end-of-file marker, CTRL+Z.
Additional query words:
Keywords : kbCRT kbVC |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |