Determines the number of bytes offset from the current stream position to the beginning of the array.
int pcount() const;
The function pcount() is used to determine the offset of the array. This may not equal to the number of characters inserted due to possible positioning operations.
Returns an int_type that is the length of the array.
#include <iostream> #include <strstream> int main() { ostrstream out; out << "CodeWarrior " << 1234 << ends; out << "the size of the array so far is " << out.pcount() << " characters \n"; out << " Software at work" << ends; out << "the final size of the array is " <<out.pcount() << " characters \n"; cout << out.str() << endl; return 0; }