I know this has been asked many many times, but I am a complete beginner at Linux and I have never used it before this. I am trying to set up VSCode for the past hour or so, and now that I finally got the extensions working (did i?) I tried testing it out and it doesn't work. When I type couple basic lines of code:
#include <iostream>
using namespace std;
int main()
{
cout << "It's not working" << endl;
return 0;
}
And when I try to run the code I get this:
[Running] cd "/home/user/School/CPP Codes/" && g++ test.cpp -o test && "/home/user/School/CPP Codes/"test
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function_start': (.text+0x20): undefined reference tomain'
collect2: error: ld returned 1 exit status
[Done] exited with code=1 in 0.096 seconds
I read on some of the posts that I should add -o ?! But again I have 0 clue what that means or what I should do exactly. So any help would be insanely appreciated!
test.cppis the right file?