int max = ~0;
What does it mean?
As noted, ~0 yields 0xFFFFFFFF.
However, I suspect the original programmer is confused. executing int max = ~0 ; sets the signed integer max to the value -1.
int max = ~0 ;
max