getwc

Reads the next character from a specified file, and converts it to a wide-character code.

Format

#include  <wchar.h>

wint_t getwc  (FILE *file_ptr);

Arguments

file_ptr
A pointer to the file to be accessed.

Description

Since getwc is implemented as a macro, a file pointer argument with side effects (for example getwc (*f++)) might be evaluated incorrectly. In such a case, use the fgetwc function instead. See the fgetwc function in this section.

Return Values
The returned character. 
WEOF  Indicates the end-of-file or an error. If an error occurs, the function sets errno. For a list of the values set by this function, see fgetwc in this section. 


Previous Page | Next Page | Table of Contents | Index