Re: "clear" an ostringstream
wang wrote:
On 15 Aug., 22:23, "Francesco S. Carta" <entul...@gmail.com> wrote:
Hence there must have been some other problem hanging around when
you posted your original question.
I'm to 99% certain that you are right. Neither oss.str("") nor
oss.str(string()) works with MS VC++6. On Ubuntu Linux with g++,
oss.str(string()) works just fine. I've forgotten if I've tested
with oss.str("") on Linux.
Since I realized that VC++6 doesn't work with ostringstream this
way, I went back to ANSI C and used sprintf() to fulfil my task. I
wanted to write "pure" C++ code, but VC++6 doesn't let me do it.
kwwang
You have just identified one of the biggest problems in writing "pure"
C++ code: VC6.
That is a release published 12 years ago, just before the C++
standard. A decent compiler during the previous millennium, but you
shouldn't be using that now unless soemone is paying you big $$$ for
supporting equally old software.
Current version is VC10.
Bo Persson