Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Returns a count of the number of elements written to the controlled sequence.
streamsize pcount( ) const;
Return Value
A count of the number of elements written to the controlled sequence.
Remarks
Specifically, if pptr is a null pointer, the function returns zero. Otherwise, it returns pptr – pbase.
Example
// strstreambuf_pcount.cpp
// compile with: /EHsc
#include <iostream>
#include <strstream>
using namespace std;
int main( )
{
strstream x;
x << "test1";
cout << x.rdbuf( )->pcount( ) << endl;
x << "test2";
cout << x.rdbuf( )->pcount( ) << endl;
}
Output
5
10
Requirements
Header: <strstream>
Namespace: std