Search code examples
c++visual-studio-codemicrosoft-file-explorer

My C++ program is deleted when I close my file explorer


I'm not exactly sure why my C++ programs are deleted in Visual Studio Code when I close my file explorer (that has the folder containing my C++ programs open). I get something like so:

programDeletionFromVSC

I'm not exactly sure what's wrong since my programs run just fine when the file explorer isn't closed. Does anyone know how to fix this? I'd appreciate any help or feedback!


Solution

  • When you "open" a file from inside a zip archive, the Explorer temporarily extract the file.

    When you close the Explorer the temporary files are deleted.

    If you want to keep the files, you need to extract (copy out) the files from the archive to a permanent location.