Search code examples
dev-c++

How to fix "Cannot save file" error in dev-c++


I'm have been working on this c file for some time and regularly saving it each time i execute the code. All of a sudden i can't save the file due to an error: "cannot save file D:\Applications\C\C_files\no_of_days.c"

Here's a screenshot.

I have been having the same error while trying to save different c files for a few days now (this never happened before). On googling the error, i found only one suitable answer, there it was suggested to not use folder names with spaces for saving programs in dev-c++.

I did that but the problem still persists.

This is my first time asking a question on stack overflow, so forgive me for any mistakes that i may have made.

Edit: As a temporary solution for this issue, I copied the code and pasted the code into a new file and save it with a different name. After a few times of saving and execution, the same error occurs. I did the abovementioned steps(making a new file....) 4 more time, and each time, after a few saves, the same error occurs.


Solution

  • The problem was google sync.

    Dev-c++ couldn't save the file after editing it as google sync was using it for a long time even after it was synced. I paused google sync, restarted my computer and then the files could be saved again.