str

Returns a pointer to the stored array.

char* str();

Remarks

The function str() freezes and terminates the character array stored in the buffer with a null character. It then returns the null terminated character array.

A null terminated char array is returned.

Listing: Example of istrstream::str() usage.
#include <iostream>
#include <strstream>

const int size = 100;
char buf[size] = "CodeWarrior - Software at Work";   

int main()
{
   istrstream istr(buf, size);
   cout << istr.str();
   return 0;
}

Result:

  CodeWarrior - Software at Work