I am trying to create a c++ ostream for educational reasons. My test will be creating an ostream that acts like a ofstream would except instead of writing to a file it would
Use std::stringstream
#include #include int main() { std::stringstream s; s << "Plop" << 5; std::cout << s.str(); }