| hasanfaraz (6) | |
|
Task is to search for a certain texts in a file in c++ I need to create a file and put some text inside it and then later on search for a particular word and then perform some operations and then start search for different word from where I left. what logic should i apply I am not getting. Can anyone help TIA | |
|
|
|
| NwN (591) | |||||
|
Hi there, First you will need to create an object of ifstream to read the file:
Then you open the file: ifs.open("filename");Then you read every word into a string and check against the search-word:
Hopefully that will get you on your way. All the best, NwN | |||||
|
|
|||||
| hasanfaraz (6) | |
|
Thanks a lot mate...... I have got it. | |
|
|
|