Standard C++ Library Reference ISO/IEC (VERSION3)

vfwprintf, vwprintf, and wprintf,
For the stream s, the call fwide(s, 0) is always valid and never causes a change of state.
Any other call to fwide, or to any of the five groups of functions described above, causes the
state transition shown in the state diagram. If no such transition is shown, the function call is
invalid.
The state diagram shows how to establish the orientation of a stream:
The call fwide(s, -1), or to a byte read or byte write function, establishes the stream
as byte oriented.
The call fwide(s, 1), or to a wide read or wide write function, establishes the stream
as wide oriented.
The state diagram shows that you must call one of the position functions between most write
and read operations:
You cannot call a read function if the last operation on the stream was a write.
You cannot call a write function if the last operation on the stream was a read, unless that
read operation set the end-of-file indicator.
Finally, the state diagram shows that a position operation never decreases the number of valid
function calls that can follow.
See also the Table of Contents and the Index.
Copyright © 1989-2001 by P.J. Plauger and Jim Brodie. All rights reserved.