Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to read one character at a time from file?

Status
Not open for further replies.

pbertra

Programmer
Dec 11, 2005
1
CA
i have a comma delimited file, an example entry below:

"AACC","Dec 9",21.60,"+0.60","+2.86%",9.77,N/A

and i want to only take the third element and feed it to a function in my c++ program. right now i can read in a line (like the line above) into my program but i just need to know how to step thru the line and only take the third element. i was trying to do this by trying to find the second comma and then taking everything after it until the third comma. i couldn't get it to work. any help and code would be great. thanks.

Phil
 
Present YOUR code and we can help you (I hope;).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top