-1

I am new to programming and just yesterday installed Visual Studios 2019. I tried writing a simple code today to just test the software. I opened a new project, opened the solution and project under the same directory, and opened a new file to start coding. I wrote a simple code for printing Hello World by using namespace and cout functions inside the main curly brackets, and decided to run it using the 'local windows debugger'. But as soon as I click it shows a popup message saying " Unable to start the program because the system couldn't find the file specified". I have checked my paths, and all seem fine. Please tell me how to solve it. I have also attached a photograph of what's happening in this link.

2 Answers2

0

It seems there is no executable because you haven't built your code. I think there are "errors" in the code, so the compiler would not generate any executable. For example, you declared main() as returning void, but you return an integer. However, it also does say "No issues found".. You can compile with Ctrl+F7

mmixLinus
  • 1,646
  • 2
  • 11
  • 16
-1

i would personaly recommend going to the plugins tab on vscode and you should see a search bar, in the search bar search for "code runner" the first one should have a picture of the text ".run" in orange click on it and then there should be a blue button that says "install" press it and you should have it working, this plugin uses cntrl + alt + n to run the code and cntrl + alt + m to stop the code, if you are using input go to file > prefrences > settings type "run in terminal" then you should see a box with the text "code-runner: run in terminal" check the box if you dont try restarting vscode and then everything should run correctly (sorry if im using a wrong format or something this is my first time commenting on a post <3)