Thread: Bufsiz

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    3

    Question Bufsiz

    Using fgets, could I use the macro BUFSIZ if I wanted to read a line sequential file in one, or would I have to read the file in parts?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    If you want to read an entire file, or just a huge chunk (or any specificly sized chunk), use "fread() ". If you want to read a line, upto N bytes in length, use "fgets() ".

    Quzah.
    Last edited by quzah; 11-14-2001 at 04:20 PM.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BUFSIZ value
    By Laserve in forum C Programming
    Replies: 4
    Last Post: 10-18-2006, 12:15 AM
  2. BUFSIZ question
    By Ash1981 in forum C Programming
    Replies: 2
    Last Post: 02-05-2006, 10:11 AM
  3. Newb With Small Pointer Issue
    By G-Prime in forum C Programming
    Replies: 7
    Last Post: 09-06-2004, 04:09 PM
  4. Fgets problem again
    By MethodMan in forum C Programming
    Replies: 5
    Last Post: 02-29-2004, 12:32 AM
  5. What size exactly is the constant BUFSIZ
    By Zahl in forum C++ Programming
    Replies: 2
    Last Post: 04-27-2003, 11:20 AM