I'd like to know the maximum value of size_t on the system my program is running.
My first instinct was to use negative 1, like so:
size_t max_size = (size_t)-1;
But I'm guessing there's a better way, or a constant defined somewhere.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…