Topics





Project 1: EOF issues





Method 1: Repeat Code

cin >> str ; while( !cin.eof() ) { // do something cin >> str ; }



Method 2: Stuff It In the while Condition

while(cin >> str) { // do something }





Method 3: while(1) then break

while (1) { cin >> str ; if (cin.eof()) break ; // do something }





Project 1: computing medianRating






Lazy Evaluation





Mutable Data Members