find the position in a stream

How can i find the position of a especific char in a stream ?
For example, i need to open a txt file and read line by line, each line has some characteres and i need to know the position of a comma in the lines.
Thank you.
To find a character in string, use find():
http://www.cplusplus.com/reference/string/string/find/
Topic archived. No new replies allowed.