|
-
September 5th, 2012, 06:51 AM
#3
Re: Streaming Bytes into an Integar
Yes, getc() is converted to an int automatically, but I want to be able to stream three bytes, and concatenate them into a single integar. In this way, the first byte in the integar is zeros, and the second, third and fourth are determined by the values of the three bytes I have just streamed.
So for example, if I stream three chars that have values 0xFF, 0xAA and 0x33, I want to create an integar whose value is 0x00FFAA33.
And I don't know why I am using getc and not fgetc - don't really know the difference!
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|