Hello, I had a question about a CS program. We were asked to write a program for a file that reads mail.dat and output all string containing the "@" sign to file adresses.dat. We are supposed to use strings for this..
My thoughts are that we should go invididually, character by character to see if the word we are currently at contains "@" if it does, we want to output the whole string to address.dat. Obviously this programs main purpose is to record an email address.
For example for the following mail:
Date: Wed, 13 Aug 2003 17:12:33 EDT
The program would then output the two email addresses to addresses.dat.
How would i write the program to go character by character and extract the email addresses with the @ sign