basic_streambuf::sputc

int_type sputc(E c);

If a write position is available, the member function stores c in the write position, increments the next pointer for the output buffer, and returns ch, which is the value T::to_int_type(c). Otherwise, it returns overflow(ch).