string literal
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
This section is incomplete Reason: C++11 stuff |
Indice |
[modifica]Sintassi
" (unescaped_character|escaped_character)* " | (1) | ||||||||
L " (unescaped_character|escaped_character)* " | (2) | ||||||||
[modifica]Spiegazione
, 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.
- Qualsiasi carattere validoOriginal: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.
[modifica]Tipo
# Il tipo di una stringa senza prefisso letterale è 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.
# Il tipo di una stringa letterale è L"..."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.
[modifica]Note
- Letterali stringa possono essere concatenatiOriginal: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. - Il carattere NUL \ 0 viene sempre aggiunto alla stringaOriginal: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. - Può essere usato per inizializzare array di caratteriOriginal: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.
[modifica]Esempio
char array[]="Foo""bar";// same aschar array[]={'F', 'o', 'o', 'b', 'a', 'r', '\0'};