error in running the code in Visual Studio

I have the error while running my code in Visual Studio
Can someone please recommend me the solution?
https://imgur.com/a/ZWVEgsh
Hello usmannazir,

Your picture is nice, but the code it-self is not the problem. A full screen shot of the IDE would be of more use to start with.

I would start with a picture of the full IDE screen as it might be something simple.

Andy
Dear Andy,
Here is the full picture.,
https://imgur.com/a/T1aFT16
Regards
usmannazir
Did you not even look at the Output window? It's clearly saying that the project failed to build. If the program doesn't compile you can't run it, and if you can't run it you can't debug it.
You have to fix whatever compiler errors there are, first.
Yes
This is path the software is telling me to go.
https://imgur.com/a/EzNbL0o
What changes do I need to make on this page.
Hello usmannazir,

In addition to what helios said when the output window says that the program failed to compile you need to look at the error list window.

In this case the error messages are clear. Follow over to the heading "file" and it will tell you which file the problem is in.

I would say that when you started to create the solution and project you used the wizard to start you with a file that contains "main". The first line of code should be #include "pch.h" . This is unique to VS 2017 and must be included in each ".cpp" file that you create.

A better alternative is to create an empty solution/project that does not require the "pch.h" file. The down side if any is that you have to add all the files to the solution that you need.

For now try putting the above include statement in each ".cpp" file as line 1 and see what happens.

Hope that helps,

Andy
Topic archived. No new replies allowed.