thank you for the response. Finnally, I figured out the key problem. the fstream object is the data member of my class not declared mutable, but in the member function declared const, the fstream.getline() failed. //ps: the error information vc.net2003 offers me //just confuses me:(