This is for windows users . Firstly make sure MINGW compiler is installed and the paths are added in environment variables.If that all are fine. Secondly, Open Vs code , Imagine I have a opened folder named projects , inside that I have a subfolder named C++ , inside that a file named let it be aiera.cpp .
so to run my file, I would open terminal then change directories ie , : c/users/Projects/C++
g++ aiera.cpp -o aiera
./aiera.exe
ie, g++ filename.cpp -o filename
./filename.exe