Your first programming assignment got you started processing your raw e-mail inbox. In this assignment, you'll refine that program to take input from a file using a "file stream" rather than cin, and to display the contents of e-mail messages that are requested by the user.
To learn more about file input and output, read section 5.1 of your textbook. You might also find the programs fileInput1.cpp and files.cpp helpful.
The finished program should do the following:
Here's an example session with the finished program:
What is the name of the mailbox? tempMailbox 1. From: Diane CaribouSubject: Re: Lichen vs. grass 2. From: Joan Elk Subject: Re: Antler care 3. From: "David R. Moosicant" Subject: Re: Database course proposal 4. From: Eleanor Emu Subject: Re: feathers 5. From: Andrew Qudu Subject: artiodactylism Message number (0 to quit): 5 Return-Path: Received: from caesar.acns.carleton.edu (Caesar.ACNS.Carleton.edu [137.22.1.26]) by mathcs.carleton.edu (8.9.3/8.9.3) with ESMTP id RAA17347 for ; Tue, 16 Jan 2001 17:45:41 -0600 Received: from mail.ungulates.com ([208.42.17.1]) by carleton.edu (PMDF V5.2-32 #36754) with SMTP id <0G7A0042R1SMW7@carleton.edu> for jondich@mathcs.carleton.edu (ORCPT rfc822;jondich@carleton.edu); Tue, 16 Jan 2001 16:43:35 -0600 (CST) Received: from RBDOMAIN-Message_Server by mail.ungulates.com with Novell_GroupWise; Tue, 16 Jan 2001 16:44:34 -0600 Date: Tue, 16 Jan 2001 16:44:13 -0600 From: Andrew Qudu Subject: artiodactylism To: jondich@carleton.edu, MIME-version: 1.0 X-Mailer: Novell GroupWise 5.5.2 Content-type: text/plain; charset=US-ASCII Content-disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mathcs.carleton.edu id RAA17347 I have an even number of toes on each foot. Do you? If not, what's odd-toed life like? Yours most sincerely, A. Qudu Hit return when you're ready for the list again. [etc.]
We will walk through the program in class on 1/17/01.
Have fun, start early, and keep in touch.