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_
As an alternative to bit-operations suggested in the other answers, you could do this in C++
#include size_t maxvalue = std::numeric_limits::max()