cryptotech
Technical User
How would I fputs my text on the top line of a text file each time, shifting the previous lines down?
When I append a text file using fputs or fwrite, I want the next line appended on the top line, not the bottom.
In other words, each successive string added to the text file is added to the top line of the text file and the previous lines are shifted down ( the first line written is at the bottom line of the file and the most recent line is always the top line) Text written could be different lengths.
I've tried different combinations of fseek, fwrite, fputs and can not achieve it.
thanks for any suggestions,
When I append a text file using fputs or fwrite, I want the next line appended on the top line, not the bottom.
In other words, each successive string added to the text file is added to the top line of the text file and the previous lines are shifted down ( the first line written is at the bottom line of the file and the most recent line is always the top line) Text written could be different lengths.
I've tried different combinations of fseek, fwrite, fputs and can not achieve it.
thanks for any suggestions,