string literal
Aus cppreference.com
![]() | This page has been machine-translated from the English version of the wiki using Google Translate. The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
This section is incomplete Reason: C++11 stuff |
Inhaltsverzeichnis |
[Bearbeiten]Syntax
" (unescaped_character|escaped_character)* " | (1) | ||||||||
L " (unescaped_character|escaped_character)* " | (2) | ||||||||
[Bearbeiten]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.
You can help to correct and verify the translation. Click here for instructions.
- Jede gültige CharakterOriginal:Any valid characterThe 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.
You can help to correct and verify the translation. Click here for instructions.
- see Escape-Sequenzen
[Bearbeiten]Type
# Der Typ eines ohne Präfix Zeichenfolgenliteral ist constchar*
Original:
# The type of an unprefixed string literal is constchar*
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
# Der Typ einer L"..." Zeichenfolgenliteral ist constwchar_t*
Original:
# The type of a L"..." string literal is constwchar_t*
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten]Notes
- String-Literale können verkettet werdenOriginal:String literals can be concatenatedThe 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ängtOriginal:The NUL character \0 is always appended to the stringThe 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 initialisierenOriginal:Can be used to initialize character arraysThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten]Beispiel
char array[]="Foo""bar";// same aschar array[]={'F', 'o', 'o', 'b', 'a', 'r', '\0'};