size_t

This is a discussion on size_t within the C++ Programming forums, part of the General Programming Boards category; Is size_t basically the same as an unsigned integer?...

  1. #1
    Un Artiste Extraordinaire volk's Avatar
    Join Date
    Dec 2002
    Posts
    357

    size_t

    Is size_t basically the same as an unsigned integer?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I believe it's defined as something like "the smallest unsigned value big enough to return the value returned by the 'sizeof' call". Something to that effect.

    Usually it ends up being an unsigned int or an unsigned long.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Un Artiste Extraordinaire volk's Avatar
    Join Date
    Dec 2002
    Posts
    357
    Thank you.

    I guess size_t isn't used a lot since I don't believe I've seen it in anyone's code at cprog (maybe I wasn't really looking).

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21