简体   繁体   English

Visual Studio:无法启动程序,系统找不到指定的文件 Visual Studio 错误?

[英]Visual Studio: Unable to start program, the system cannot find the file specified visual studio error?

Here I'm Using visual studio 2019 community edition.这里我使用的是 Visual Studio 2019 社区版。 I open a folder from file->new->existing project.我从文件->新建->现有项目打开一个文件夹。 But whenever i build and run my program.但是每当我构建和运行我的程序时。 it says它说

Unable to start program 'O:\1.Fourth semester\programminh\main\Debug\Main2.exe' the system cannot find the file specified Unable to start program 'O:\1.Fourth terminh\main\Debug\Main2.exe' 系统找不到指定的文件

There are lots of programs.有很多节目。 like bubble.cpp, binary.cpp but it runs Main2.exe.像bubble.cpp、binary.cpp 但它运行Main2.exe。

Here is my linear.cpp file这是我的 linear.cpp 文件

#include <iostream>
using namespace std;
int main(){

            int n, an, arr[30], key, i, found=0;
            cout<<"Please enter number of element you want:"<<endl;

            cin>>n;
            cout<<"Please enter the numbers"<<endl;
            for(i=0;i<n;i++){
                cin>>arr[i];
            }


            cout<<"Please Enter the number you want to search"<<endl;
            cin>>key;

            for(i=0;i<n; i++){

                if(arr[i] == key){
                    cout<<"Element found at position "<<i+1;

                    found=1;
                    break;
                }
                }


                if(!found){
                    cout<<"Number Not Found"<<endl;
                }








            return 0;


}

Can someone check it out, please?有人可以检查一下吗?

I open a folder from file->new->existing project.我从文件->新建->现有项目打开一个文件夹。

As far as I'm concerned you should open a.sln file instead of a folder.就我而言,您应该打开 a.sln 文件而不是文件夹。

You could only run the.sln file (Visual Studio Solution) not a.cpp file.您只能运行 .sln 文件(Visual Studio 解决方案)而不是 .cpp 文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 视觉工作室。 无法启动程序 &#39;&#39; 系统找不到指定的文件 - Visual Studio. Unable to start program '' The system cannot find the file specified Visual Studio2012。“无法启动程序” * .exe“找不到指定的文件” - Visual Studio 2012. “unable to start program” *.exe “cannot find the file specified” Visual Studio 调试器错误:无法启动程序 找不到指定文件 - Visual Studio debugger error: Unable to start program Specified file cannot be found Visual Studio 2022 CMake 错误系统找不到指定的文件 - Visual Studio 2022 CMake Error The System cannot find the file specified Visual Studio - Imread 系统找不到指定的文件 - Visual Studio - Imread system cannot find the file specified 系统找不到指定的文件Visual Studio 2015 - The system cannot find the file specified Visual Studio 2015 系统找不到指定的文件。 在 Visual Studio 中 - The system cannot find the file specified. in Visual Studio 错误:无法启动程序“*.exe”系统找不到指定的文件 - Error: unable to start program "*.exe" the system cannot find the file specified Microsoft Visual Studio:找不到指定的文件 - Microsoft visual studio: Cannot find file specified Visual Studio“找不到指定的路径”错误 - Visual studio “cannot find the path specified” error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM