I have file text.txt and want to change upper case letters to lower case letters.
I'm not sure how to read from the file and use STL list<char> to store letters.
Now I can store characters in <list>.
I want to replace 'ph' with 'f' in words.
For example, the word "photograph" becomes "fotograph".
Can I do this with iterator?
Just picture how to do it and then write the code:
1) Use the iterator to search for 'p'.
2) When a 'p' is found check if next element == 'h'
3) If so, overwrite 'p' with 'f' and remove the next element.
Untested, but it seems like that would work.
The iterator for a list is bi-directional so ++iter gives next and --iter gives prev. (hence the term "iterator").
Please read up so you know how to use a list.
http://www.cplusplus.com/reference/stl/list/
Have some code showing an attempt for further help.