如何解决 "not recognized as an internal or external command" 问题

how to fix "not recognized as an internal or external command" issue

当我写一个简单的代码时

#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 . . . <

有人能帮忙吗?

注意:我锁定了它,问题不是"path"

CTRL+F7 只编译程序。它不会构建它。构建程序需要两个阶段,即编译阶段和 link 阶段。只需按 F7 而不是 CTRL+F7 并重试。