08-21-2013 02:03 AM
Right now i am using open and lseek to do my file management. i have code to convert this to fopen and fseek with a compiler flag.
which is the prefered mechanism to use?
right now i open up a file and the beginning of my program and leave it open for the entire program (until exit) and lseek to the proper position. however after some time it appears as if the file descriptor is going bad.....
08-21-2013 09:21 AM
Can't you use one of the higher level api's what's the data you are working on?
I use QFile with no problems, alongside other QT classes to manipulate data within a file.
The time to open and close a file should be fairly negliable on modern OS so just open and close as needed.