string literal
De 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. |
<metanoindex/>
| This section is incomplete Reason: C++11 stuff |
Syntaxe
" (unescaped_character|escaped_character)* "
|
(1) | ||||||||
L " (unescaped_character|escaped_character)* "
|
(2) | ||||||||
Explication
; 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.
- N'importe quel caractre valideOriginal: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.
Type d'
# Le type d'une chane sans prfixe littral est
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.
You can help to correct and verify the translation. Click here for instructions.
# Le type d'une chane littrale est
L"..." 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.
You can help to correct and verify the translation. Click here for instructions.
Notes
- Les littraux de chane peuvent tre concatnesOriginal: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. - Le caractre NUL \ 0 est toujours ajout la chaneOriginal: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. - Peut tre utilis pour initialiser des tableaux de caractresOriginal: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.
Exemple
char array[] = "Foo" "bar";
// same as
char array[] = { 'F', 'o', 'o', 'b', 'a', 'r', '\0' };