So, the size of size_t is not specified, only that it has to be an unsigned integer type. However, an interesting specification can be found in chapter 7. 18. 3 of the standard: Limit of size_t size_max …

There are some functions in c/posix that could/should use size_t, but don't because of … The sizeof operator yields the size (in bytes) of its operand, which may be an expression or the parenthesized name of a type. The size is determined from the type of the operand. Assuming a … If the size of the int is that important one can use int16_t, int32_t and int64_t (need the iostream include for that if i remember correctly). What's nice about this that int64_t should not have issues on a 32bit … I'm really curious why shape is an attribute of arrays and a function in the numpy model but not a method of array objects.

If the size of the int is that important one can use int16_t, int32_t and int64_t (need the iostream include for that if i remember correctly). What's nice about this that int64_t should not have issues on a 32bit … I'm really curious why shape is an attribute of arrays and a function in the numpy model but not a method of array objects. Is there an obvious answer? Does it feel like it merits a separate so … In several c++ examples i see a use of the type size_t where i would have used a simple int. What's the difference, and why size_t should be better?

In several c++ examples i see a use of the type size_t where i would have used a simple int. What's the difference, and why size_t should be better?