| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help Plz!!!!!!!!!!!!
You're working for a company thats 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 ouputs every string containing the @ sign to the file addresses.dat. For the purpose of this project, a string is defined as it is by the C++ stream reader- a continous sequence of non-whitespace characters. Given the data.
From = sharon@marzipan.edu; Date = Wed, 13 Aug 2003 17:12:33 EDT; Subject = Re: Hi; To = john@meringue.com John Dave's email is dave_smith@icing.org. ttyl, sharon; Then the program would output on file addresses.dat: sharon@marzipan.edu john@meringue.com dave_smith@icing.org Any help would be appreciated. |
|
#2
|
|||
|
|||
|
pseudocode (with pointers on where to look for documentation):
Code:
declare collection of strings to hold all strings that contain '@' //vector open file //ifstream while it isn't the end of the file input a string //cin(iostream), string if the string contains @, add it to the collection //string.find() keep while'ing close file output collection elements |
|
#3
|
|||
|
|||
|
Thanks for the help but what are the strings im declaring is whats stopping me
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Help Plz!!!!!!!!!!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|