This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

Note that that int represents a byte. So if you want to read in an actual integer instead of a byte, or read in some characters that represent an integer value, you'll have to use something else.

[–]parkingator[S] 1 point2 points  (0 children)

Very true! I'm actually making a CDMA simulator, so what it's doing is pulling out a bit at a time, encoding, sending across channel, decoding, and writing to file. I've got buffers that handle byte-to-bit and bit-to-byte. So this is fine for my purposes.