buf buf buffer

This is a discussion on buf buf buffer within the C Programming forums, part of the General Programming Boards category; Just wondering, when you mention buffer in your code, are you configuring a buffer that's part of stdio, or are ...

  1. #1
    Unregistered
    Guest

    buf buf buffer

    Just wondering, when you mention buffer in your code, are you configuring a buffer that's part of stdio, or are you creating an additional one?

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    "buffer" is just a place to put stuff. Most of the posts here though are talking about an array of chars, making a buffer for a string.

    >char buffer[1024];
    A buffer, length 1024 bytes, for holding chars.

    there are other types, can you expand your question, or provide example code you want explained?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Unregistered
    Guest
    Hammer, you're using buffer as the name of a character array. Is it possible, and common, to reconfigure the buffer that is built into scanf, for example?

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,646
    The system allocates it's own buffering for keyboard input, etc. You should look into the setvbuf function if you want to use your own custom buffer for these devices.
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  5. #5
    Unregistered
    Guest
    Thank you, Sebastiani.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 10-29-2006, 04:04 AM
  2. writing a pack-style function, any advices?
    By isaac_s in forum C Programming
    Replies: 10
    Last Post: 07-08-2006, 08:09 PM
  3. buffer contents swapping
    By daluu in forum C++ Programming
    Replies: 7
    Last Post: 10-14-2004, 02:34 PM
  4. Tetris Questions
    By KneeGrow in forum Game Programming
    Replies: 19
    Last Post: 10-28-2003, 10:12 PM
  5. Console Screen Buffer
    By GaPe in forum Windows Programming
    Replies: 0
    Last Post: 02-06-2003, 04:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21