M
Matt Garman
Is there a clean, portable way to determine the maximum value of
converted numerical fields with printf()-like functions? Doing this
at compile-time would be preferable.
For example, %i should never convert to a string that is longer than
the number of digits in INT_MAX, right?
I'd like to create a structure that contains character
representations of numerical types (e.g., instead of storing 3421 as
an int, it would store the char array "3421"). I'd like to make
these fields a fixed-size static array, but obviously I don't want
to make them too small.
Thanks!
Matt
converted numerical fields with printf()-like functions? Doing this
at compile-time would be preferable.
For example, %i should never convert to a string that is longer than
the number of digits in INT_MAX, right?
I'd like to create a structure that contains character
representations of numerical types (e.g., instead of storing 3421 as
an int, it would store the char array "3421"). I'd like to make
these fields a fixed-size static array, but obviously I don't want
to make them too small.
Thanks!
Matt