std::basic_streambuf<CharT,Traits>::sputc
Min standard notice:
Writes one character to the output sequence.
# Declarations
int_type sputc( char_type ch );
# Parameters
ch: character to write
# Return value
The written character, converted to int_type with Traits::to_int_type(ch) on success.
# Example
#include <iostream>
#include <sstream>
int main()
{
std::ostringstream s;
s.rdbuf()->sputc('a');
std::cout << s.str() << '\n';
}