How would you set a variable to equal infinity (or any guaranteed largest number value) in C?
I generally use the *_MAX
macros found in limits.h
INT_MAX
for integers etc. These will always be correctly set for the variable type. Even the explicitly sized types such as uint32 will have corresponding entries in this header file.
This has the virtue of being the largest possible value that a variable of that type can hold.
For an unsigned integer as you asked for in your question, you would use UINT_MAX