Sometimes it is useful and necessary to store additional data in a stream. The input and output operations were internationalized and relayed the task of date formatting and parsing to the stream's locale. Here, however, the rules for formatting and parsing were fixed, making them much more restricted than the features available in the standard C library, for example. Now imagine you want to improve the input and output operations for the date class by allowing specification of such format strings. And indeed, you can.
Streams have an array for private use.
An array element is of a union type that allows access as a long or as a pointer to void . The array is of unspecified size, and new memory is allocated as needed. In principle, you can think of it as infinitely long. You can use this array to store in a stream whatever additional information you might need. In our example, we would want to store the format string.