# Visual Studio Code compile C/C++ on Windows
Follow the step of the [Tutorial](https://code.visualstudio.com/docs/cpp/config-mingw)
## Step 1: Go to the [Offical website](https://code.visualstudio.com/) and download VS code

## Step 2: Install the [C/C++ extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)

## Step 3: Download the [Mingw-w64](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)
*Here comes the tricky one.*
You have to **add the path** to your **Mingw-w64 bin folder** to the **Windows PATH environment variable**.
1. In the Windows search bar, type '**control panel**' -> '**User Accounts**' -> '**User Accounts**' -> '**Edit environment variables for your account**'
2. Choose the **Path** variable and then select **Edit**.
3. Select **New** and add the Mingw-w64 path to the system path.
- The exact path depends on which version of Mingw-w64 you have installed and where you installed it. (You have to check when you install the Mingw-w64)
- Ex: C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin
4. Save it
## Step 4: Just follow the [tutorial](https://code.visualstudio.com/docs/cpp/config-mingw) and create your cpp file
# Build multiple C++ files
In `task.json`
You can modify your tasks.json to build multiple C++ files by using an argument like ``"${workspaceFolder}\\*.cpp"`` instead of `${file}`.
This will build all .cpp files in your current folder.
###### tags: `Visual Studio Code`