c++ - 如何修复 "not recognized as an internal or external command"问题

标签 c++ visual-studio visual-studio-2012

当我写一个像

这样的简单代码时
#include <iostream>
using namespace std;

int main() {
    cout << "Hello World";
    return 0;
}

然后在不调试的情况下启动它,它给了我这个消息

'"C:\Users\Acer\Documents\Visual Studio 2012\Projects\ConsoleApplication6\Debug\ ConsoleApplication6.exe"' is not recognized as an internal or external command, operable program or batch file. Press any key to continue . . . <

有人能帮忙吗?

注意:我锁定了它,问题不是“路径”

最佳答案

CTRL+F7 只编译程序。它不会构建它。构建一个程序需要两个阶段,编译阶段和链接阶段。只需按 F7 而不是 CTRL+F7,然后重试。

关于c++ - 如何修复 "not recognized as an internal or external command"问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42386651/

相关文章:

c++ - 推荐内存占用较小的快速 C++ UI 库

c++ - 在运行时或编译时更改 API?

c# - 在 VS2010 C# 解决方案中查找缺失引用的更简单方法

visual-studio - Visual Studio Post-Build 事件 - 如果文件位于子文件夹中,如何将文件复制到输出(bin)目录(仅当较新时)

c++ - SDL2 尝试裁剪纹理或表面

c++ - 简单的 int 到字符串转换... Int 到 const char* 无效

c++ - 是否可以更早地销毁对象,使其存储内存被后续对象重用?

visual-studio - UWP - SignTool 错误 : No certificates were found that met all the given criteria

javascript - 我在 Windows 8 中从 Visual Studio 2012 执行程序后,Node.js 控制台立即关闭

visual-studio - 如何禁用可能由Visual Studio生成的MSI日志文件