D
Default User
Victor said:Since the size of 'size_t' (which is its own type, not a typedef for
anything) is implementation-defined, you should consider looking for
an implemenation-specific solution. For example, in Win64 casting
to unsigned long is not going to work very well. Microsoft did add
the I64 specifier (IIRC) for printing out types that are longer than
unsinged long.
That's a way, but in my mind needless unportability. When used for its
intended purpose, holding a size of an object, size_t is very rarely
going to have a value larger than ULONG_MAX.
Brian