Reinitialize this stream buffer to use the specified character buffer.

Synopsis

Declared in <bdlsb_fixedmeminstreambuf.h>

FixedMemInStreamBuf*
setbuf(
    char const* buffer,
    std::streamsize length);

Description

Reinitialize this stream buffer to use the specified character buffer having the specified length. Return the pointer providing modifiable access to this stream buffer. The behavior is undefined unless `buffer != 0 && length > 0` or length == 0`. Upon re‐initialization for use of the new buffer, neither the content nor the next input position indicator are preserved. Note that `buffer is held but not owned.

Return Value

pointer providing modifiable access to this stream buffer

Parameters

Name

Description

buffer

character buffer to use

length

length of buffer

Created with MrDocs