Hello all
im using ofstream to writing to file and then appending strings to file
the problem is that im writing to file many times some thing like 5000+ times ( the reason is it writing to file directories and files )
the code open file and writing to it looks like this :
Code:ofstream myfile ("my_log.txt",ios::app); if (myfile.is_open()) { myfile << c <<".\n"; myfile.close(); }
how can i improve the speed of writing to file ?