Mail Archives: djgpp/1999/01/14/17:25:20
Does this type belongs to posix standard or ansi standard?
__________________________________________________________________________
|| ||
||**********************************************************************||
||______________________________________________________________________||
|| ||
|| ||
||Ismael Herrera Z. ||
||Maestria en Ciencias de la Computacion (MCC) IIMAS UNAM Mexico ||
||ihz AT uxmcc2 DOT iimas DOT unam DOT mx ||
||http://uxmcc1.iimas.unam.mx/~ihz ||
|| ||
||tel. 6 22 36 52 ||
|| ||
|| ||
|| ||
|| ||
||______________________________________________________________________||
|| ||
||**********************************************************************||
||______________________________________________________________________||
On Thu, 14 Jan 1999, DJ Delorie wrote:
>
> > could someone please explain to me how size_t works please?
>
> size_t is a variable whose range of values covers all possible sizes
> of other variables. Example:
>
> size_t a;
> char b[100];
> a = sizeof(b); /* a is now 100 */
> printf("a = %d\n", a); /* prints "a = 100" */
>
> > ie. when you decalre a variable to be of type int at compile time it sets
> > aside 2 bytes for the integer to be stored.
>
> 4 bytes.
>
> > What happens when you declare a variable or function to be of type
> > size_t ??
>
> You get a variable that can hold the value of the size of any object.
>
- Raw text -