GCC 4.4.1, C99
I am using size_t, and size_t is an unsigned int. However, that depends if you are running 32 bit or 64 bit.
I will be using size_t to store the size of a buffer.
So I don’t think this would be very portable if using across architectures.
Just a question, with using size_t on either a 32 or 64 bit. What situations would cause the most serious problem?
size_tis guaranteed to be able to hold the number of bytes of any object on your implementation.That’s why the return type of
sizeofissize_t.So yes, it’s portable.