+ 3
How to write a program in C++ such that it will delete itself after execution ?
4 odpowiedzi
+ 1
It doesn't work for Windows.
+ 1
batch file?
0
You cannot really delete a file from itself, it's just nonsense.
However the only way I think it would be possible is to call a Bash file (or similar OS language file) and delay it so that your program finishes and the Bash deletes your .exe.