I think I've sort of got it into memory now but there are still problems. When I try to print out the file that I've just got, it only gives me the last row.
And then I try to change a character and write the whole file back. However this just erases the original documnet.
Here is the code
I'm sure the problems are more than obvious to your average programmer, however I'm still a newbie so any help is appreciated.
// Read file into memory
FILE *in = fopen("file_to_edit", "r");
for (i=0; i<3; i++)
fgets(filename, SIZE, in);
printf( "got this from document: %s\n", filename);
// Print out what i got
for (i=0; i<21; i++)
// Change a value and store back into document
FILE *in2 = fopen("file_to_edit", "w");
filename = 9;
for(i = 0; i<10; i++);