B
blix
When I output my char to a stream and it has a value of 11, it writes a ^B
(vertical tab). This is understandable. When I attempt to stream it back
into a char variable, it skips it because a tab is considered whitespace.
If I cast the char to int, it'll stream out an 11 so that I can read it in
plain english. Doing this same cast while streaming the value in doesn't
read the value. I have to use a temporary int variable and then assign my
char to it.
Internally I suspect the IOStream library is using the "%c" format
specification if the type is a char. Is there a way to tell the IOStream
library to use the "%d" format specification for the char type?
(vertical tab). This is understandable. When I attempt to stream it back
into a char variable, it skips it because a tab is considered whitespace.
If I cast the char to int, it'll stream out an 11 so that I can read it in
plain english. Doing this same cast while streaming the value in doesn't
read the value. I have to use a temporary int variable and then assign my
char to it.
Internally I suspect the IOStream library is using the "%c" format
specification if the type is a char. Is there a way to tell the IOStream
library to use the "%d" format specification for the char type?