size_t
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/>
<tbody> </tbody>| Definido no cabeçalho <stddef.h>
|
||
| Definido no cabeçalho <stdio.h>
|
||
| Definido no cabeçalho <string.h>
|
||
| Definido no cabeçalho <time.h>
|
||
typedef /*implementation-defined*/ size_t; |
||
size_t é do tipo unsigned inteira do resultado do operador sizeof eo operador alignof. Original:
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
size_t pode armazenar o tamanho máximo de um objeto, teoricamente possível, de qualquer tipo (incluindo matriz). Em muitas plataformas (uma exceção são sistemas com endereçamento segmentado) size_t pode armazenar o valor de qualquer ponteiro não-membro, caso em que é sinônimo de uintptr_t.Original:
size_t can store the maximum size of a theoretically possible object of any type (including array). On many platforms (an exception are systems with segmented addressing) size_t can safely store the value of any non-member pointer, in which case it is synonymous with uintptr_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.
size_t é comumente utilizado para indexação de matriz e contagem de loop. Programas que usam outros tipos, como unsigned int, para indexação de matriz pode falhar em, por exemplo, Sistemas de 64 bits em que o índice excede UINT_MAX ou se se baseia em 32 bits aritmética modular.Original:
size_t is commonly used for array indexing and loop counting. Programs that use other types, such as unsigned int, for array indexing may fail on, e.g. 64-bit systems when the index exceeds UINT_MAX or if it relies on 32-bit modular arithmetic.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.
Veja também
assinado tipo inteiro retornado quando subtraindo dois ponteiros Original: signed integer type returned when subtracting two pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
| byte offset from the beginning of a struct type to specified member (função macro) | |
C++ documentation for size_t
| |