Re: size_t

Discussion in 'C Programming' started by Paul Emmons, Jul 5, 2003.

  1. Paul Emmons

    Paul Emmons Guest

    On 21 Jun 2003 08:40:37 GMT, Emmanuel Delahaye <>
    wrote:

    >> I'm not clear on the difference between the type size_t and unsigned
    >> int.

    >
    >Well, a 'size_t' is a 'size_t' and an 'unsigned int' is an 'unsigned int'.
    >Feel better?


    Not much. To say that something is an unsigned int implies things
    about the kinds of arithmetic or comparison operations that can be
    done on it.

    To say merely that size_t something completely different leaves us
    wondering what can be done with it except to feed the correct value
    into a function that takes an argument of that type.

    That amount of knowledge doesn't always suffice in writing one's own
    functions.

    But I've enjoyed the discussion and learned what I was wondering about
    the meaning of size_t.

    And I'm going to keep using unsigned, rather than signed, ints except
    when I need negative values :)

    Thanks you, all!
     
    Paul Emmons, Jul 5, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Howard Hinnant

    Re: size_t ... standards

    Howard Hinnant, Jun 29, 2003, in forum: C++
    Replies:
    5
    Views:
    3,585
    Jim Fischer
    Jun 30, 2003
  2. Howard Hinnant

    Re: size_t ... standards

    Howard Hinnant, Jun 29, 2003, in forum: C++
    Replies:
    0
    Views:
    858
    Howard Hinnant
    Jun 29, 2003
  3. Chris \( Val \)

    Re: for(size_t a=begin();a!=end();++a){}

    Chris \( Val \), Jul 13, 2003, in forum: C++
    Replies:
    2
    Views:
    368
    John Harrison
    Jul 14, 2003
  4. Alex Vinokur
    Replies:
    9
    Views:
    834
    James Kanze
    Oct 13, 2008
  5. Alex Vinokur
    Replies:
    1
    Views:
    612
Loading...

Share This Page