std::basic_streambuf<CharT,Traits>::sputc

Writes one character to the output sequence.

# Declarations

int_type sputc( char_type ch );

# Parameters

# 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';
}

# See also