Home c++ the program cannot be launched in Microsoft Visual Studio 2017 the specified...

the program cannot be launched in Microsoft Visual Studio 2017 the specified file cannot be found

Author

Date

Category

Create a project: File & gt; New & gt; Project … & gt; Empty Project

Create a file: File & gt; New & gt; File .. & gt; C++ File

I am writing a standard “Hello, world!”

# include & lt; iostream & gt;
#include & lt; cstdlib & gt;
using namespace std;
int main ()
{
   cout & lt; & lt; "Hello, world!" & lt; & lt; endl;
   system ("pause");
   return 0;
}

Press ctrl + f5. Construction is in progress, there are no errors in the code, but the error “cannot start the program” path to exe file “pops up” The specified file cannot be found.

There is no exe file on this path, it is not even created.

I would appreciate your help.


Answer 1, authority 100%

You need not just create a file, but create and add it to the project. This is done this way, in the solution explorer, right-click on Source Files and select Add->New Item. If you have already created a file, as now, then select Add- & gt; Existing Item there and select your file

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions