Just read 4 bytes and don't store the result ?
Or use a 'seek' function to advance the stream by 4 bytes ?
A bit of code to fill us in on exactly what kind of stream you're talking about might help.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
line 16 is not needed because the file pointer is always set to beginning of file when the file is opened -- line 12.
line 17 is an infinite loop because lines 19 and 20 reset the file pointer back to the 4th byte in the file on every loop iteration. Suggestion: delete line 19 altogether because it isn't needed. Move line 20 outside the while loop, to line 16.
don't use eof() function because it doesn't do what you think it does. Code the loop like this
while( fileopen >> c)
{
// blabla
}
Ancient Dragon
Retired & Loving It
30,046 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,342