What is the maximum value for a UInt32?
Is there a way I can use the sizeof operator to get the maximum value (as it is unsigned)? So I don't end up with #defines or magic numbers in my code.
There's a macro UINT32_MAX
defined in stdint.h
which you can use
#include <stdint.h>
uint32_t max = UINT32_MAX;
<stdint.h>
:http://pubs.opengroup.org/onlinepubs/009695299/basedefs/stdint.h.html