C
Confused User
I am curious what the origins of size_t are. I see that it is usually
typedef'd to be the native integer size of a particular machine. I also see
that routines like strncpy(char *t, const char *s, size_t n).
So, is size_t the native size of the machine or used to describe the actual
size of something (like the len of a string copy).
If it is named because it designates the size of something, then could I
still have more than 65535 bytes of something. If so why is that called
size_t.
I understand that it is just an int, but I don't understand the name. I can
have a size that is larger than an int. Perhaps I could store the size of
something in long? Wow?!?!?!
What the heck are the origins for the name?
Elvis
typedef'd to be the native integer size of a particular machine. I also see
that routines like strncpy(char *t, const char *s, size_t n).
So, is size_t the native size of the machine or used to describe the actual
size of something (like the len of a string copy).
If it is named because it designates the size of something, then could I
still have more than 65535 bytes of something. If so why is that called
size_t.
I understand that it is just an int, but I don't understand the name. I can
have a size that is larger than an int. Perhaps I could store the size of
something in long? Wow?!?!?!
What the heck are the origins for the name?
Elvis