How can I remove from a file, bytes from i to i.
Example: "today me and my roomates went to a party";
if i = 3, I want to remove the 3rd byte, the 6th, the 9th... etc
I tried using lseek and fgets but I didn't know how to do the whole thing.
What I tried:
FILE* f = fopen(name_file,"r");
lseek(f,0,SEEK_SET);
while(fgets(lune,255,f) != NULL){
lseek(f,i,SEEK_SET);
}
I didn't do too much because I don't know exactly what to do. Maybe you can help me with some answers and tips.