What can I use instead of strstream :: freeze?

I am working on some old C ++ codes and it has a streamstream class that is deprecated. I need to replace them with workers.

In my header file, I got the following:

ostrstream          tokenBuff;

and a .c file that uses the header:

tokenBuff.freeze(0);
tokenBuff.seekp(0);

I replaced ostrstream with ostringstream . ostringstream has seekp () but not freeze (). How can I deal with this problem. Thank.

+4
source share
2 answers

freeze() std::ostringstream - , strstream . - ( char* str()) , , strstream , freeze() , , strstream str() - std::ostringstream , str() std::string.

+6

ostringsteam freeze, . ostrstream freeze() , str() c-style (char *).

+1

Source: https://habr.com/ru/post/1681330/


All Articles