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?
Printable View
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?
"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?
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?
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.
Thank you, Sebastiani.