algorithm,fstream and sstream