<strstream>
The <strstream>
header declares several classes for reading from
character arrays and writing to character arrays in the same manner as
reading from and writing to files.
This header and its classes are deprecated in the standard,
meaning they might disappear from a future version of the standard.
Instead, you are encouraged to use the <sstream>
header and its class
templates. Nonetheless, the <strstream>
classes have their uses;
when you are dealing exclusively with narrow characters, and are using
character arrays instead of string objects, these classes sometimes
offer better performance than their <sstream>
counterparts.
See Chapter 10 for a general
discussion of I/O, and the <istream>
and <ostream>
sections in this chapter for
information about the base classes from which the strstream
classes derive. Refer to the
<streambuf>
section in this
chapter for information about the streambuf
class.
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.