f << endl -- ends the line currently being put out to the file f.
It is an essential portable programming practice to use endl always, for writing newline characters (see newline) to a file will not terminate a line containing nets properly, and it will not flush the output buffer.
The manipulator endl is a member of the class Manipulator.