This is a warning, not an error. You get an executable file. However, if you are trying to compile with -pedanticor -Werror, then you will not. If this micro offer is what you are working with, then what you need to do is change your format specifier to %ld. On your platform size_t, which will be returned sizeof, maybe 8 bytes on 64-bit, but 4 bytes on 32-bit. %dcan display a 32-bit integer, but not a 64-bit integer.
source
share