I'm new to programming and wanted to try out VS Code for C++ development. I'm getting this error and I can't find a solution online how to fix:
Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Here is my code:
#include <iostream>
using namespace std;
long FactorielleMod(int n){
const int c= 1000000007;
if (n == 1 ){
return n;
} else {
return ((n % c)*FactorielleMod(n-1)) % c;
}
}
Basically a code to compute the factorial function. Can anyone help me with this?