C++ :: How To Read A Bit From A Byte
Mar 30, 2013What is the most efficient way to read a bit at a particular position in a byte?
View 13 RepliesWhat is the most efficient way to read a bit at a particular position in a byte?
View 13 RepliesWhat is the most efficient way to read a bit at a particular position in a byte?
View 3 Replies View RelatedTrying to write very simple code to read a 4 byte int from a file.
code:
int tester;
FILE *fp;
fp=fopen("/home/bdluser/skeleton.blx","rb");
fread(&tester,sizeof(int),1,fp);
printf("tested 1 byte read should be 1: %i",tester);
I have tried editing the binary file....it outputs similar large numbers
00000000000000000000000000000001 outputs 808464432
0x00000001 outputs 808482864
0x10000000 outputs 808548400
10000000000000000000000000000000 outputs 808464433