FILE* values;
fopen_s(&values,"values.txt","rb");
char bytes_read[2][4];
for(int min=0;min<2;++min)
{
// read the bytes for the maximum value of the hack
fread(bytes_read[min],2,1,values);
// advance the file
fseek(values,2,SEEK_CUR);
}
the 2s in fseek and fread are actually from another variable, but I substituted here for readability.
This code doesn't work for me.
Any help?
Edit: Nevermind. The file I was attempting to read consisted of: 27 0F 00 01 27 0F 00 01 ... so when I read two bytes I got 27 0F.. then it advanced the buffer by 2.. however, the fseek advanced the buffer by an EXTRA 2, which brought me to the next 27 0F. sorry
Edited by RobotGymnast, 28 October 2008 - 02:36 PM.


Sign In
Create Account


Back to top









