cmd提示不是内部或外部命令,也不是可运行的程序 或批处理文件。

琪越 苏 0 Reputation points
2024-04-10T05:12:36.9433333+00:00

我在vscode中搭建了一个c\c++的环境,但是在运行hello world时出现了错误“ ******不是内部或外部命令,也不是可运行的程序或批处理文件。”我在之前搭建的过程中没有遇到类似的问题,我已经重启过了电脑。User's image

我应该怎么办

Windows for business Windows Server User experience PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-04-10T06:09:02.61+00:00

    Hi,

    It seems that cmd cannot find your hello world. You can run it with the full path or modify the environment variable Path. Open "Edit environment variables for your account" from the start menu, edit the Path variable, and add the directory in which your hello world is located. Then restart CMD and try again.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

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