istrstream is the class that specializes istream to use a strstreambuf for extraction from arrays of characters in memory. You can create an istrstream object by associating the object with a previously allocated array of characters. You can then read input from it and apply other operations to it just as you would to another type of stream.
Class header file: strstream.h