# std::getwchar

> C++ Atlas: `cppatlas.com/w/cpp/io/c/getwchar` | Source: https://en.cppreference.com/w/cpp/io/c/getwchar | Domain: Input/output

Reads the next wide character from stdin.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <cwchar>
std::wint_t getwchar();
```

Reads the next wide character from `stdin`.

### Parameters

(none)

### Return value

The obtained wide character, or `WEOF` if an error has occurred or the end of file reached

### See also

- [`getchar`](https://en.cppreference.com/w/cpp/io/c/getchar): reads a character from `stdin` (function)
- [`fgetwc`](https://en.cppreference.com/w/cpp/io/c/fgetwc), [`getwc`](https://en.cppreference.com/w/cpp/io/c/fgetwc): gets a wide character from a file stream (function)
- [C documentation for `getwchar`](https://en.cppreference.com/w/c/io/getwchar)

---
Attribution: content from https://en.cppreference.com/w/cpp/io/c/getwchar (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.