Name: Anonymous 2007-03-23 22:09 ID:HKvm8kzy
Hey, I'm trying to create a class that's derived from ostringstream. So, it's like this:
class Message2:public ostringstream {
public:
Message2 *flush();
};
My flush command does some special stuff, but the problem is it's never called! I've tried setting unitbuf (message << unitbuf; - is that the right way?), but that doesn't improve anything. Ending my streams with endl or flush doesn't call it either. So what's going on here?
class Message2:public ostringstream {
public:
Message2 *flush();
};
My flush command does some special stuff, but the problem is it's never called! I've tried setting unitbuf (message << unitbuf; - is that the right way?), but that doesn't improve anything. Ending my streams with endl or flush doesn't call it either. So what's going on here?