Hi All,
I'm not an expert in C, and what I need to do is the following.
I have a certain large .txt file that has many lines (sometimes the lines are separated with one empty line, sometimes two, sometimes 3,...etc. Some of these lines have "= 9999999999" at their end.
What I need to do is to eliminate such lines (the lines that have "= 9999999999" at their ends).
I'm thinking of reading each line, storing it, checking whether it has that string at its end of not, and then pasting it in a new file if it doesn't (and not doing anything if it does), and so on. That way, at the end I will have a new file that has what I want.
My questions are:
1. What would be the code for reading a whole line?
2. How can I store each line? I mean should I store it in a string or what exactly?
3. How can I search that string or whatever I store that line in, for that certain string on interest at its end ("= 9999999999"). I mean what would the code be in that case?
Thanks a lot and sorry for asking too much!
Aly