Prev Up Next
Go backward to 9/7/2001   BGL Book Now Available in Bookstore
Go up to News Archive
Go forward to 9/7/2001   A Look at Several C++ Classes, Focusing on Special Member Functions

9/7/2001   Word Frequency Program Source Code Made Available

 AP Wire Service
The source code for the first part of the word frequency program discussed in today's lecture is available here (zip file). This code provides a good answer to Exercise 3-3 in the homework but doesn't include the extra code that produces as the output a listing of the N most frequent words and their frequencies, in nonincreasing order. Try extending the code to do that yourself (again, attempting to make good use of the standard library to obtain a compact and efficient solution).

 

Prev Up Next