Udostępnij za pośrednictwem


strstreambuf::pbackfail

A protected virtual member function that tries to put back an element into the input stream, and then makes it the current element (pointed to by the next pointer).

virtual int pbackfail( 
   int _Meta = EOF 
);

Parameters

  • _Meta
    The character to insert into the buffer, or EOF.

Return Value

If the function cannot succeed, it returns EOF. Otherwise, if _Meta == EOF, it returns some value other than EOF. Otherwise, it returns _Meta.

Remarks

The protected virtual member function tries to put back an element into the input buffer, and then make it the current element (pointed to by the next pointer).

If _Meta == EOF, the element to push back is effectively the one already in the stream before the current element. Otherwise, that element is replaced by ch = (char)_Meta. The function can put back an element in various ways:

  • If a putback position is available, and the element stored there compares equal to ch, it can decrement the next pointer for the input buffer.

  • If a putback position is available, and if the strstreambuf mode says the controlled sequence is modifiable, the function can store ch into the putback position and decrement the next pointer for the input buffer.

Requirements

Header: <strstream>

Namespace: std

See Also

Reference

strstreambuf Class

iostream Programming

iostreams Conventions

Other Resources

strstreambuf Members