I have written a file conversion program and it worked fine until I came across a file it would not convert, on investigation it is the oddest of things, I need every 32nd byte of data in each file so I use:
for(int i = 32; i != 0; i--){InputFile.get(TempChar);}
This is fine but with one file, on reading in the bytes from the file it decides to skip 80 Bytes of data, the section of the file in hex is:
44 45 53 43 00 00 00 00 00 00 00 43 CD 01 00 00
1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
57 45 49 47 48 54 00 00 00 00 00 4E E7 01 00 00
0B 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
53 50 45 43 49 41 4C 00 00 00 00 43 F2 01 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
53 54 41 4E 44 41 52 44 00 00 00 43 F3 01 00 00
44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
42 45 46 4F 52 45 00 00 00 00 00 4C 37 02 00 00
After reading the last byte on line 1 '00' it jumps to the first byte on the last line '42'
in ASCII:
DESC.......C....
................
WEIGHT.....N....
................
SPECIAL....C....
................
STANDARD...C....
D...............
BEFORE.....L7...
So to summarise if I use InputFile.get(TempChar); on the last '.' on the first line, then use InputFile.get(TempChar); again it reads the 'B' from the last line and then continues on from there. Completely ignoring the 7 lines of data inbetween.
Any help on this would be greatly appricaited.......
for(int i = 32; i != 0; i--){InputFile.get(TempChar);}
This is fine but with one file, on reading in the bytes from the file it decides to skip 80 Bytes of data, the section of the file in hex is:
44 45 53 43 00 00 00 00 00 00 00 43 CD 01 00 00
1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
57 45 49 47 48 54 00 00 00 00 00 4E E7 01 00 00
0B 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00
53 50 45 43 49 41 4C 00 00 00 00 43 F2 01 00 00
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
53 54 41 4E 44 41 52 44 00 00 00 43 F3 01 00 00
44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
42 45 46 4F 52 45 00 00 00 00 00 4C 37 02 00 00
After reading the last byte on line 1 '00' it jumps to the first byte on the last line '42'
in ASCII:
DESC.......C....
................
WEIGHT.....N....
................
SPECIAL....C....
................
STANDARD...C....
D...............
BEFORE.....L7...
So to summarise if I use InputFile.get(TempChar); on the last '.' on the first line, then use InputFile.get(TempChar); again it reads the 'B' from the last line and then continues on from there. Completely ignoring the 7 lines of data inbetween.
Any help on this would be greatly appricaited.......