Environment Setup (VSCode)
- SourceForge (old version):
- Download MinGW - Minimalist GNU for Windows and install selecting all options.
- Add
bin
path ofMinGW
e.g:C:\MinGW\bin
- TDM-GCC(setup and use):
- Download and install tdm-gcc
- Msys2 (Latest version - Recommended by vscode):
More sources available in mingw-w64
-
Install C/C++ Extension Pack & Code Runner extension
-
To run code that has spaces in filename (
first code.cpp
) add this in vscode setting:"code-runner.runInTerminal": true, "code-runner.executorMap": { "cpp": "cd $dir && g++ \"$fileName\" -o \"$fileNameWithoutExt\" && \"./$fileNameWithoutExt\"" }