Hello! I’m relatively new to learning C++ and coding in general. I use Visual Studio Code and am on the lesson about organizing functions in files, where you create a greet function header/hpp file and a greet cpp
To my notice, everything I’m aware of matches the lesson, but when I try to run it, I get the error pictured along with my main code function below:
(Please forgive poor phone photo. Wi-Fi is out atm. Can provide clearer screenshots when it’s back up)
Under greet.cpp, I have the following:
#include
using namespace std;
void greet(string name) {
cout << “Hello “ << name;
}
And for greet.hpp:
#ifndef UTILS_GREET
#define UTILS_GREET#include
void greet(std::string name);
#endif
When I try to run and debug it, I get the following error:
launch: program ‘C:\Users\wfall\OneDrive\Documents\Coding Projects\Lessons\HelloWorld\main.exe’ does not exist
Followed by the options to open ‘launch .json’ or cancel.
I’ve never encountered this before any guidance would be greatly appreciated, as I want to make sure I know why what I can only assume will be an important feature isn’t working for me
Ty!!!