Re: Writing several images into a single binary file



rossum wrote:

When reading the file check for an empty line where the image should
start and take action accordingly.


Well, before the image there is an empty line, and I use a function to ignore up to 1000 empty lines. This function works all the times but when this ghost line shows up from nowhere...


this is the function:

void skipEmptyLines( std::istream& is )
{
char next = is.peek();
while( next == '\n' ) {
is.ignore( 10000, '\n' );
next = is.peek();
}
}

.



Relevant Pages