J
jacek.dziedzic
Hi!
On a machine where size_t is 64-bit, unsigned long is 32-bit, how
does one construct a size_t literal that says 2^32? Typing in
size_t x = 4294967296UL;
complains about the value being too large for unsigned long
(obviously, it's too large by one).
The nonstandard suffices "UI64" are also not recognized by the
compiler.
Should I construct with a value of 4294967295UL and then increment
the size_t variable?
TIA,
- J.
On a machine where size_t is 64-bit, unsigned long is 32-bit, how
does one construct a size_t literal that says 2^32? Typing in
size_t x = 4294967296UL;
complains about the value being too large for unsigned long
(obviously, it's too large by one).
The nonstandard suffices "UI64" are also not recognized by the
compiler.
Should I construct with a value of 4294967295UL and then increment
the size_t variable?
TIA,
- J.