Thread: What size exactly is the constant BUFSIZ

  1. #1
    Registered User
    Join Date
    Oct 2002

    What size exactly is the constant BUFSIZ

    BUFSIZ is declared in stdio.h but I havn't been able to find out exactly how big it makes the buffer when I use it.

    I'm just curios.
    Well english isn't my first language, (it's instead a useless language called danish which only 5 milion people speak!!) so if you think my grammar SUCKS (it does by the way) than you're more then welcome to correct me.
    Hell I might even learn something

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Look in your stdio.h file. In mine, (VC++ 6.0 Pro), it says...

    #if defined(_M_MPPC)
    #define BUFSIZ 4096
    #else /* defined (_M_MPPC) */
    #define BUFSIZ 512
    #endif /* defined (_M_MPPC) */

    ... I would not rely on that for any random buffer I used, I would always size my own.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Ontario, Canada
    #include <iostream>
    #include <cstdio>
    int main( void ) {
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fixing my program
    By Mcwaffle in forum C Programming
    Replies: 5
    Last Post: 11-05-2008, 03:55 AM
  2. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  3. Having a problem with templates and classes
    By bowluswj in forum C++ Programming
    Replies: 4
    Last Post: 06-26-2007, 12:55 PM
  4. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  5. An exercise in optimization
    By Prelude in forum Contests Board
    Replies: 10
    Last Post: 04-29-2005, 03:06 PM