inheriting ostream and streambuf problem with xsputn and overflow
问题 I have been doing research on creating my own ostream and along with that a streambuf to handle the buffer for my ostream. I actually have most of it working, I can insert (<<) into my stream and get strings no problem. I do this by implimenting the virtual function xsputn. However if I input (<<) a float or an int to the stream instead of a string xsputn never gets called. I have walked through the code and I see that the stream is calling do_put, then f_put which eventually tries to put the