use gcount() instead of eof() because ignore() doesn't set the eof bit in some versio...