C
Christopher Benson-Manica
This is starting to seem ridiculous to me
#include <streambuf>
#include <iostream>
class
TWFileStream : public std::streambuf
{
private:
char cbuf[2];
protected:
TLSFile lsf;
virtual int_type overflow (int_type c)
{
*cbuf=c;
if(!LastOpSucceeded||!(LastOpSucceeded=lsf.Write(cbuf)))
return(EOF); return(c);
}
virtual std::streamsize xsputn(const char *s, std::streamsize num)
{
lsf.Write(s);return(0);
}
};
If there's nothing wrong with the above definition, *why* am I getting
errors about "operator<< not implemented in type TWFileStream"? I
thought that was the whole grand goal of this plan to inherit from
streambuf? *sigh*
#include <streambuf>
#include <iostream>
class
TWFileStream : public std::streambuf
{
private:
char cbuf[2];
protected:
TLSFile lsf;
virtual int_type overflow (int_type c)
{
*cbuf=c;
if(!LastOpSucceeded||!(LastOpSucceeded=lsf.Write(cbuf)))
return(EOF); return(c);
}
virtual std::streamsize xsputn(const char *s, std::streamsize num)
{
lsf.Write(s);return(0);
}
};
If there's nothing wrong with the above definition, *why* am I getting
errors about "operator<< not implemented in type TWFileStream"? I
thought that was the whole grand goal of this plan to inherit from
streambuf? *sigh*