i coded a project at C. However I deleted my main.c file. But I have my .exe file. Is it possible to recompile the .exe file to a .c file? Or is the .c file lost forever?
thx for help
CodePudding user response:
No, it's not possible to get the C code back. Decompilers exist, but are not nearly good enough to produce sensible C code out of an .EXE file.
Lesson of the day: always use version control from the start. Commit often. Use remote server (like Github/Gitlab/etc, kot endorsing sny specific one) and pushing often, even incomplete code, is also wise.
CodePudding user response:
If you wrote the code recently, just rewrite it from scratch. You may have deleted the code from your hard drive, but not the underlying logic from your brain. And for sure you will avoid the errors you made before. So it will take less time than it took before.
If it is older code, you should dig in your backups. If you don't have any, you generally ask for trouble..........