string literal
De cppreference.com
<metanoindex/>
| Esta seção está incompleta Motivo: C++11 stuff |
Sintaxe
Explicação
; 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.
- Qualquer caractere válidoOriginal: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.
Tipo
# O tipo de uma seqüência de unprefixed literal é
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.
# O tipo de uma string literal é
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.
Notas
- Literais de cadeia podem ser concatenadasOriginal: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. - O caráter NUL \ 0 é sempre acrescentado à cadeiaOriginal: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. - Pode ser usado para inicializar matrizes de caracteresOriginal: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.
Exemplo
char array[] = "Foo" "bar";
// same as
char array[] = { 'F', 'o', 'o', 'b', 'a', 'r', '\0' };
