Replace FILE with fstream.