Namespaces
Variants
Views
Actions

character literal

From cppreference.com
< cpp‎ | language
Revision as of 08:01, 3 January 2014 by Cubbi (Talk | contribs)

Contents

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)

Explanation

unescaped_character
Any valid character
escaped_character
see escape sequences

Type

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

Note

Multicharacter literals (5) have implementation-defined value