다음을 통해 공유


basic_filebuf::setbuf

Performs an operation particular to each derived stream buffer.

virtual basic_streambuf<Elem, Tr> *setbuf(
    char_type *_Buffer,
    streamsize _Count
);

매개 변수

  • _Buffer
    Pointer to a buffer.

  • _Count
    버퍼의 크기입니다.

반환 값

The protected member function returns zero if the file pointer fp is a null pointer.

설명

setbuf calls setvbuf(fp, (char *)_Buffer, _IOFBF, _Count * sizeof (Elem) ) to offer the array of _Count elements beginning at _Buffer as a buffer for the stream. If that function returns a nonzero value, the function returns a null pointer. Otherwise, it returns this to signal success.

요구 사항

Header: <fstream>

네임스페이스: std

참고 항목

참조

basic_filebuf 클래스

iostream 프로그래밍

iostreams 규칙