CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: file functions

  1. #1
    Join Date
    Sep 2001
    Posts
    16

    file functions

    there are two sets of functions that handles files. "lseek" "fseek", "read" "fread", "open" "fopen" ...
    These functions have the same functionality, except one set uses file handle which is int, the other set uses FILE*. Is there any other differece other than they accept different parameters? Why do we have two sets of file handling functions?


  2. #2
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    47

    Re: file functions

    From the MSDN:

    Stream I/O (fread, fwrite, etc.)
    These functions process data in different sizes and formats, from single characters to large data structures. They also provide buffering, which can improve performance. The default size of a stream buffer is 4K. These routines affect only buffers created by the run-time library routines, and have no effect on buffers created by the operating system.

    Low-level I/O (lseek, etc.)
    These functions invoke the operating system directly for lower-level operation than that provided by stream I/O. Low-level input and output calls do not buffer or format data.





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured