getw
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The getw function reads the next binary value of type int from the
file associated with <stream>. It then increments the associated
file pointer (if there is one) to point to the next unread
character. The getw function does not assume any special alignment
of items in the stream.
Return Value
The getw function returns the integer value read. A return value
of EOF may indicate an error or end-of-file. However, the EOF
value is also a legitimate integer value, so feof or ferror should
be used to verify an end-of-file or error condition.
NOTE: The getw function is provided primarily for compatibility
with previous libraries. Portability problems may occur with
getw, since the size of int and the ordering of bytes within
int differ across systems.
-♦-