“The system cannot find the file specified” when running C++ program

6

I installed Visual Studio 2010. I wrote a simple code which I’m sure is correct but unfortunately, when I run the code, I get the error below.

Here is my code:

#include<iostream>
using namespace std;
int main (){ 
  cout <<"Hello StackOverFlow ;)";
  return 0;
}

And here is the error:

Unable to start program ‘C:\Users\Soheil\Desktop\New folder\sam\Debug\sam.exe The system cannot find the file specified

Would you help me solve the issue? Should I define the project in a specific directory? I’ve spent a ton of hours to solve this issue and have not had any success yet.

Leave a Comment