string literal – cppreference.com
Aus cppreference.com
<metanoindex/>
Syntax
" (unescaped_character|escaped_character)* "
|
(1) | ||||||||
L " (unescaped_character|escaped_character)* "
|
(2) | ||||||||
Erklärung
; Unescaped_character
Original:
;unescaped_character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Jede gültige Charakter
Original:
Any valid character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
; Escaped_character
Original:
;escaped_character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- see Escape-Sequenzen
Type
# Der Typ eines ohne Präfix Zeichenfolgenliteral ist const char*
Original:
# The type of an unprefixed string literal is const char*
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
# Der Typ einer L"..." Zeichenfolgenliteral ist const wchar_t*
Original:
# The type of a L"..." string literal is const wchar_t*
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Notes
String-Literale können verkettet werden
Original:
String literals can be concatenated
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.Das NUL-Zeichen \ 0 wird immer in den String angehängt
Original:
The NUL character \0 is always appended to the string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.Kann verwendet werden, um Zeichen-Arrays zu initialisieren
Original:
Can be used to initialize character arrays
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Beispiel
char array[] = "Foo" "bar"; // same as char array[] = { 'F', 'o', 'o', 'b', 'a', 'r', '\0' };