首页 > 解决方案 > 我应该如何为我的 Visual Studio 代码设置编译器?

问题描述

当我想运行代码时,它显示

The terminal process terminated with exit code: -1.

cannot open output file test.exe: Permission denied
collect2.exe: error: ld returned 1 exit status

它出什么问题了?我想知道,有什么区别

run task 
run build task
run active file
run selected text

起初我可以运行我的代码,但是我发现如果我更改我的代码并再次运行,结果仍然是一样的,我必须按''运行构建任务''并且代码会改变。我可能会更改设置或其他东西,因为现在它不起作用。.\***.cpp还有一个问题,按右上角的运行按钮和在终端中输入有什么区别?他们是一样的吗?

标签: c++visual-studio-codeterminalcompiler-errorspermission-denied

解决方案


推荐阅读