I have a issue in display string stream content. I want to make string stream containing timer time with fixed 2 numbers before and after point. To not recreate over and over i decided to make it in constructor of class that have it. I make something like this:
timerTextString << std::fixed << std::setprecision(2) << std::setw(5) << std::setfill('0');
But, when i clean it like this(I've found this in other discussions):
timerTextString.str("");
it seems to clear iomanip flags.
When I display this in next frame it don't have any manipulation.
To make it work I must in each write use manips:
timerTextString << std::fixed << std::setprecision(2) << std::setw(5) << std::setfill('0') <<timeLeft.asSeconds();
Have you any solution? I want to no use it at any write to code look much clear and (probably) faster using that stream.