该系统找不到指定的文件。在Visual Studio中 [英] The system cannot find the file specified. in Visual Studio

查看:1559
本文介绍了该系统找不到指定的文件。在Visual Studio中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继续收到这些错误代码:

I keep getting this error with these lines of code:

include <iostream>

int main()
    {

        cout << "Hello World" >>;
        system("pause");
        return 0;
    }

系统找不到指定的档案

推荐答案

系统找不到指定的文件通常意味着构建失败(它将为你的代码,因为你缺少一个前面包括,您在>> > cout 行,你需要 std :: infront的cout),但你有'run anyway'选项选中这意味着它运行一个可执行文件不存在。

The system cannot find the file specified usually means the build failed (which it will for your code as you're missing a # infront of include, you have a stray >> at the end of your cout line and you need std:: infront of cout) but you have the 'run anyway' option checked which means it runs an executable that doesn't exist. Hit F7 to just do a build and make sure it says '0 errors' before you try running it.

构建并运行的代码:

#include <iostream>

int main()
{
   std::cout << "Hello World";
   system("pause");
   return 0;
}

这篇关于该系统找不到指定的文件。在Visual Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆