std::basic_...ambuf::sputc(3)
πΈ NAME πΈ
std::basic_streambuf::sputc - std::basic_streambuf::sputc
okay so bestie, this one is from the C++ Standard Libary manual, and it's literally all about std::basic_streambuf::sputc π
β¨ Synopsis β¨
int_type sputc( char_type ch );
Writes one character to the output sequence.
If the output sequence write position is not available (the buffer is full), then it calls overflow(ch). π«Ά
π Parameters π
chβ character to write
π Return value π
- The written character, converted to
int_typewithTraits::to_int_type(ch)on success. Traits::eof()(as returned byoverflow()) on failure.
π¦ Example π¦
// Run this code
#include <iostream>
#include <sstream>
int main()
{
std::ostringstream s;
s.rdbuf()->sputc('a');
std::cout << s.str() << '\n';
}
π Output π
a
π See also π
sputninvokesxsputn()(public member function)
mwah π this cute little page is sourced from http://cppreference.com, version/date 2024.06.10, and the page itself is std::basic_...ambuf::sputc(3) β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms