hello maryam, i think you dont have write permission on the drive you're trying to compile on "creating your .exe file" try to delete "Charge1.exe" from debug folders "you dont get a problem when you run it without changing the source code cuz you're running the compiled executable file!" to clean previous objects, try Build > Clean Solution, Build > Build Solution good luck maryam