After making some changes in xyz.cpp file, when I am trying to save the whole project it asks to save files in the directory and ultimately it didn't get saved and an error message comes as
The Process cannot access the files "c:\ml/src.cpp" because it is being used by another process.
Usually to get rid of this error I use to open another .cpp file and make some chnages in that and then try to save so that other unsaved files gets save with this and sometimes it didn't work well. was wondering if there is any better way of handling it?
You should:
Download ProcessExplorer
Go to Find -> Find Handle or DLL

Navigate to your file path:

ProcessExplorer will tell you wich process are using/blocking your file.