The maximum value of "unsigned long int" in c++

user2517676 picture user2517676 · Aug 18, 2013 · Viewed 8.8k times · Source

How can I know what is the maximum assignable value for a variable from the the type of "unsigned long int"?

Answer

Jerry Coffin picture Jerry Coffin · Aug 18, 2013

The obvious way would be to use std::numeric_limits<unsigned long>::max();