mail.dat

hi i have this project and i need help with it, maybe someone can help me. please?
im really new and really confused.

"You're working for a company that's building an email list from files of mail messages. They would like you to write a program that reads a file called mail.dat, and that outputs every string containing the @ sign to file addresses.dat. For the purpose of this project, a string is defined as it is by the C++ stream reader-a contiguous sequence of non-whitespace characters.
Given the data:

From: [email protected]
Date: Wed, 13 Aug 2003 17:12:33 EDT
Subject: Re: hi
To: [email protected]

John,

Dave's email is [email protected]

ttyl,

sharon

Then the program would output on file addresses.dat:

[email protected]
[email protected]
[email protected].

Use meaningful variable names, proper indentation, and appropriate comments. Thoroughly test the program using your own data sets.

were not just going to write the program for you, post some code and we can help you through it
1
2
3
4
5
6
open the files
while more input
  read in whitespace-delimited string
  if it contains '@'
    output string
close files

Oh, goody. They've gone from just wanting code to wanting well-written, stylized, and fully tested code.
Topic archived. No new replies allowed.