Visual Studio Code: C++ Error message

Hello.
I am trying to run this C++ code but it gives an error((

Could somebody explain me what should I do or where can I read about it. I make it run as an output, but when I try to compile it with g++ for it accomplishes the task, errors again. Could somebody advise how can I compile it?
Thanks a lot.