Without wasting your time a short description is important to Describe the Problem. It is not compiling the Following Program with the error message that example.exe is not found when I tried to Build it.
#include <iostream>
using namespace std;
main()
{
string name, surname;
cout << "Enter your name: ";
cin >> name;
cout << "Enter your surname: ";
cin >> surname;
cout << "Welcome " << name << " " << surname;
return 0;
}

Your code is working on my end when I try to build it using GCC Compiler in Visual C++. Note: Other C++ Compilers need you to to declare the main function by using