CISC181 02/17/06 1.25pm Lecture Notes A debugging tip. If you get the error message: "readNames.cc", line 35: Error: Taking address of the bound function std::ios::eof() const. If you get this error, it typically means that you making a function call but forgot the (). E.g. WRONG: while (!infile.eof) CORRECT: while (!infile.eof() ) The fact that eof() ends in parentheses means that it is a function call The fact that I have infile.eof() The infile. part means that eof is a "member function" of the class to which infile belongs. An emacs tip... to find the "end of the file" use escape > to jump to the start of the file, use escape < Now... suppose we wanted to print all of the names that are of maximum length. For example, in the file, there are three names of length 15 (counting the space.) No names are longer in this list. Dick Van Dyke Ben Biro Anne Martin Paul Gordon Adam Maloney Brandon Bendigo Nevin Schlabach Brian Flad Dave Bones Eric Dramstad Burke Wadsworth Mike Sciblo The suggestion is to go through the names twice; the first time we find the length of the longest name; the second time we print all names that match. readNames5.cc will do just that...