hello i just want to compile this simple c++ code with vscode
#include <iostream>
using namespace std;
int main(){
cout<<"hi";
return 0;
}
and i try to compile it with this command
g++ main.cpp
BUT i get this error !
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status