Share via


basic_streambuf::xsputn

Protected, virtual function to insert elements into the output stream.

virtual streamsize xsputn( 
   const char_type *_Ptr, 
   streamsize _Count 
);

Parameters

  • _Ptr
    Pointer to elements to insert.

  • _Count
    Number of elements to insert.

Return Value

The number of elements actually inserted into the stream.

Remarks

The protected virtual member function inserts up to _Count elements into the output stream, as if by repeated calls to sputc, from the array beginning at _Ptr. The insertion of characters into the output stream stops once all _Count characters have been written, or if calling sputc(_Count) would return traits::eof(). It returns the number of elements actually inserted.

Requirements

Header: <streambuf>

Namespace: std

See Also

Reference

basic_streambuf Class

iostream Programming

iostreams Conventions