basic_ostream& write( const char_type* s, std::streamsize count );
Behaves as an UnformattedOutputFunction. After constructing and checking the sentry object, outputs the characters from successive locations in the character array whose first element is pointed to by
s. Characters are inserted into the output sequence until one of the following occurs:
countcharacters are inserted
- inserting into the output sequence fails (in which case setstate(badbit) is called)
|s||-||pointer to the character string to write|
|count||-||number of characters to write|
Exceptionsfailure if an error occurred (the error state flag is not goodbit) and exceptions() is set to throw for that state.
This function is not overloaded for the types signed char or unsigned char, unlike the formatted operator<<
Also, unlike the formatted output functions, this function does not set the
failbit on failure.
When using a non-converting locale (the default locale is non-converting), the overrider of this function in std::basic_ofstream may be optimized for zero-copy bulk I/O (by means of overriding std::streambuf::xsputn)
This function may be used to output object representations, i.e. binary output
| inserts character data |
| inserts a character |
(public member function)