Error for c++ function code i.e., " no such file or directory" output

#include

using namespace std;

void newFunction () {
cout << “This is my second Function attempt”;
}

int main () {
newFunction();
return 0;
}

// I’ve been trying to run this code in vscode but it keeps giving me an error, I’ve tried g++ -o and it’s still not working.
// it’s error message is "a function-definition is not allowed here before ‘{’ "
// Please I need help.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.