When using VS2019 to run the program, there is a problem that the program cannot be started "..." access is denied. Solution

When I was learning C language, the compiler used was vs2019 community edition. This time I will record the problems I encountered when using vs2019, which is the problem in the title, as shown in the figure: I Insert picture description here
don’t know if you have encountered this This situation, now let me talk about how I solved it.
First attempt : first right-click vs2019 to run as an administrator, and then run your code.
Insert picture description here

If the same error is reported, it may also be because other programs are running. This requires us to open the task manager, find devenv.exe, click to end the task, and then reopen your VS to run your program again.
Insert picture description here

If none of the above steps solve your problem, you can turn off your anti-virus software and run your code again (I am the one who can run immediately after turning off the anti-virus software, McAfee killed me)
Insert picture description here

If none of the above methods solve the problem, then I have no other way.

Guess you like

Origin blog.csdn.net/yghlqgt/article/details/109058885