*shrug* I don't have a clue. I just posted that on the off-chance it would work, because it's always worked for me that way. Tbh I don't use the iostream library very often; I tend to program more in C, so I don't know it that well.
How do I unset the code you gave me so the rest of the fields print normally?
Store the return value of setf, and then use unsetf on it:
ooops! I spoke too soon...
When I inserted the line of code you gave me I accidentally left in the printf statement and that is why I thought it worked... but it is not...
I dont freakin get this.... why in the world would one hex character be ignored?
That is indeed strange. It prints a tilde ('~') whenever you try to print 0x7E? That is odd, because 0x7E is the ASCII code for tilde. Are you using characters (chars) to store the data?
If I cast it to an INT with your line of code then it works...
since this is a one byte field that I am working with I delcared it as char... so i guess the setf that you suggested must be expecting an int type?
I would assume so. Unfortunately operator<< applied to std::cout assumes a char is referring to a character in the ASCII table. I guess you'll either have to store it in an int or typecast it as such. I'd also recommend you don't assume a char is one byte. It might not be on all platforms.
You can't really do it with char, and even then, you can't assume char is a single byte.You may as well just store it as an integer. 0x7E == 0x0000007E, but the latter is 4 bytes and not 1.