Re: Promoting unsigned long int to long int



btw, i see a lot of people saying that size_t must be used over
unsigned long. The question is are there any fix guidelines as to when
i should and when i shouldn't use size_t. It seems to me that size_t
is most commonly used in three situations :

1. Size of array or any object.
2. Array indices.
3. Count of something.

Although I don't see why using unsigned long for any of the above
could be wrong. It may not be a necessity to use size_t

.



Relevant Pages

  • Re: Promoting unsigned long int to long int
    ... pereges wrote: ... The question is are there any fix guidelines as to when ... Array indices. ... The number of nodes that malloc can generate, ...
    (comp.lang.c)
  • Re: Promoting unsigned long int to long int
    ... pereges writes: ... The question is are there any fix guidelines as to when ... making it suitable for array indices. ... The third is a bit more iffy; it depends on what you're counting. ...
    (comp.lang.c)