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.
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.