T
TheDD
Hello,
i'm developping some function to read pbm image files. Somewhere in my code
i have:
texel_t val;
while (in >> val)
{
...
}
the problem is that since the "real" type of texel_t is unsigned char, so
the my input is 48 instead of 0 (a character is read instead of a small
number).
I was hopping for some kind of manipulator to force the interpretation to "a
_number_ coded on a char" but i didn't find it.
What if the texel_t type was a template parameter, how can i force the
interpretation, if possible?
Right now, i'm using a temporary int value, but it's a hack
TIA for your time
i'm developping some function to read pbm image files. Somewhere in my code
i have:
texel_t val;
while (in >> val)
{
...
}
the problem is that since the "real" type of texel_t is unsigned char, so
the my input is 48 instead of 0 (a character is read instead of a small
number).
I was hopping for some kind of manipulator to force the interpretation to "a
_number_ coded on a char" but i didn't find it.
What if the texel_t type was a template parameter, how can i force the
interpretation, if possible?
Right now, i'm using a temporary int value, but it's a hack
TIA for your time