basic_streambuf::sputn
Puts a character string into the stream.
streamsize sputn(
const char_type *_Ptr,
streamsize _Count
);
매개 변수
_Ptr
문자열입니다._Count
The count of characters.
반환 값
The number of characters actually inserted into the stream.
설명
The member function returns xsputn(_Ptr, _Count). See the Remarks section of this member for more information.
예제
// basic_streambuf_sputn.cpp
// compile with: /EHsc
#include <iostream>
#include <fstream>
int main()
{
using namespace std;
streamsize i = cout.rdbuf()->sputn("test", 4);
cout << endl << i << endl;
}
요구 사항
Header: <streambuf>
네임스페이스: std