Access Denied while running C++ code in Visual Studio Code

Kumud Verma 1 Reputation point
2021-06-29T06:58:16.67+00:00

As i click on run code button of code runner extension of vsc
It create a .exe file which is deleted by mAcfee Antivirus 110084-screenshot-211.png

Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 125.7K Reputation points
    2021-06-29T07:39:46.24+00:00

    Check the documentation of Antivirus about file and folder exceptions: https://www.bing.com/search?q=mcafee+exclusions. Add your a.exe file or folder to the list of of exclusions.

    By the way, you can also use Visual Studio for such programs.


  2. RLWA32 51,366 Reputation points
    2021-06-29T14:26:54.933+00:00

    McAfee consumer products do not support folder exclusions. Other than removing McAfee another option is to disable real-time scanning during your development activities. Regarding folder exclusions, refer to excluding folder

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.