Why does my Anti-Virus think that my C++ program is a virus and how can I fix it?

  antivirus, c++

When compiling and running my program, my antivirus (Kaspersky Security Cloud) automatically deletes the executable and tells me to restart my computer so that it can disinfect my computer. I have a few questions.

  1. Why does the AV think my exe is a virus?
  2. How can I stop it from thinking it’s a virus?
  3. How can I retrieve my executable?

Any help is greatly appreciated!

Source: Windows Questions C++