How to get C++ to run in shell like codecademy?

I am using C++ in MS Visual studio where the cpp files have to be embedded in a project. How do I get it to run just in the console like codecademy does? Typing g++ filename.cpp doesn’t work in the cmd propmpt or powershell windows. I am using windows 10 if that helps.

I found this guide to be helpful

Even tho I am on a Linux computer :smirk: