Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
usage of size_t
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Malcolm McLean, post: 4031610"] In qsort,no. The function takes two size_ts, one giving element width in bytes, which is where you'd expect a size_t, the other giving the number of elements, which we would expect to be an int. The justification is that int may not be big enough to index an entire array. This could happen a) if int is the address size of the processor, and the array is an array of chars taking up more than half of memory, or b) if int is smaller than the address space of the machine. a) is so unlikely that we can ignore it. b) can happen if int is not 64 bits on a machine with a 64 bit address space. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
usage of size_t
Top