##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# character literal

From cppreference.com
< cpp‎ | language

### [edit] Syntax

`'` unescaped_character|escaped_character `'` | (1) |
`L` `'` unescaped_character|escaped_character `'` | (2) |
`u` `'` unescaped_character|escaped_character `'` (since C++11) | (3) |
`U` `'` unescaped_character|escaped_character `'` (since C++11) | (4) |
`'` (unescaped_character|escaped_character)+ `'` | (5) |

### [edit] Explanation

unescaped_character
  Any valid character
escaped_character
  see escape sequences

### [edit] Type

1. char
2. wchar_t
3. char16_t
4. char32_t
5. int

### [edit] Note

Multicharacter literals (5) have implementation-defined value

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/language/character_literal&oldid=66837"