troubleshooting Question

file processing (finding a delimiter)

Avatar of js531
js531 asked on
Programming
4 Comments1 Solution237 ViewsLast Modified:
Hello,
I need to write a function that takes a exterior file using fstream and scans it , looking for delimeters,for example:

an employee file that looks like this

Smith,John,Information Technology,$50,000;

the comma seperates each piece of data, while the semicolon seperates each employee record.
I need to be able to look through each piece of data and print out each out separately using the comma delimiters, and also differentiate each record by the semi colon.

i am not sure how to do it , i think i can use the fstream.seekg function to do it, but i dont know if thats the best way to do it. either way could someone please give me a coded example on how to do this?

Thank you for all your help.
 
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros