ifstream question

Hello, I have a text file filled with temperatures and the year for them in front. I want to have the user enter a year and then read the temperatures for that year. But I can't figure out how to search for the line of that year in the text file.
Any ideas would be much appreciated.
how the data was written in the file :in binary mode or in text mode
Topic archived. No new replies allowed.