Use iostream instead of fstream.