[iostreams] multichar_output_filter works only the first time
hello,
to get started with iostreams, i'm trying to write a multichar output
filter that adds a string to the beginning and the end of whatever comes
through. my code builds with a warning about unused parameter n and
works - but only the first time, the second time, i get no output.
i thought at first sending '\0' would trigger the stream's fail-bit or
so, but out.good() returns true.
any chance someone takes a look at my code and hazards a guess where the
problem might be ?
disclaimer: i was actually born and bred in C++ country long time ago,
but i've been coding in python for a couple of years and got back only
recently, so there's a good chance what i'm doing wrong is something
really simple. guess you can tell from the code, it's been a while. good
to be back though... :-)
#include <iostream>
#include <sstream>
#include
participants (1)
-
Steven Samuel Cole