hey, im making a database program using standard c functions (fopen, fclose...) and i need to read and write data to files quite frequently, so is it better to open (fopen) and close (fclose) the files before and after each operation or open the files at the beginning of the program and close them on exit? Will many open file handles affect the performance? thanks.
low_coder
26
Junior Poster in Training
Recommended Answers
Jump to Post>>so is it better to open (fopen) and close (fclose) the files before and after each operation or open the files at the beginning of the program and close them on exit?
my openion is if you don't access files regularly then then open it and close it.
In …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.