I want to write a program to load a file into memory and then modify it, and then save the changes. I have tried many methods to do this, like storing each line in a structure and and then modifying, etc, but I have failed. Please tell me a method to achieve this, I don't want any code, just a method.