There’s no single “C++ download” for Windows 10. You install a compiler and, usually, an editor. The easiest option is Visual Studio Community (free) with the Desktop development with C++ workload, which includes Microsoft’s C++ compiler, the libraries, and a debugger. If you prefer a lighter setup, install Visual Studio Code plus the free GCC compiler from MSYS2.
Both options are free for students, individuals, and open-source work. Visual Studio Community has license limits for larger companies.
Windows 10 reached end of support on October 14, 2025. Consumer Extended Security Updates (ESU) now run until October 12, 2027. These steps also work on Windows 11.
Option 1: Install Visual Studio Community
- Go to Microsoft’s Visual Studio download page and download Community. The current version is Visual Studio 2026.
- Run the installer and allow it to update itself.
- On the Workloads tab, check Desktop development with C++.
- Select Install. The download is several gigabytes.
- When it finishes, open Visual Studio and sign in or skip.

Microsoft’s guide to installing C and C++ support in Visual Studio lists the optional components.
Run your first program
- Select Create a new project, choose Console App (C++), and select Next.
- Name the project and select Create. A “Hello World” program is already written.
- Press Ctrl + F5 to build and run it. A console window shows the output.
Do I need the Microsoft Visual C++ Redistributable?
That package only runs programs built with Visual C++. It doesn’t let you write or compile code.
Option 2: Visual Studio Code With GCC (MSYS2)
- Download and install MSYS2 from its official website.
- Open the MSYS2 UCRT64 terminal and run
pacman -S --needed mingw-w64-ucrt-x86_64-toolchain. Press Enter to accept the defaults. - Add
C:\msys64\ucrt64\binto your Path: search for Edit the system environment variables, select Environment Variables, edit Path, and add the folder. - Open a new Command Prompt and run
g++ --versionto confirm it works. - Install Visual Studio Code and the C/C++ extension from Microsoft.
- Create a file named
hello.cpp, then compile it withg++ hello.cpp -o hello.exeand runhello.
Our guides to installing GCC on Windows and compiling C in Windows go into more detail.
Which Option Should You Choose?
| Visual Studio Community | VS Code + GCC | |
|---|---|---|
| Setup | One installer | Several steps |
| Download size | Several GB | Smaller |
| Debugger | Built in, very capable | Needs configuration |
| Best for | Beginners, Windows apps, games | Cross-platform code, courses that use GCC |
You can also compile C++ with Linux tools through WSL. Here’s how to install Linux on Windows.
Common C++ Setup Errors
- “g++ is not recognized”: The Path wasn’t updated, or you opened the command window before changing it. Open a new window.
- “cannot open source file iostream” in Visual Studio: The C++ workload isn’t installed. Open Visual Studio Installer, select Modify, and check it.
- The console window closes instantly: Run with Ctrl + F5 instead of F5, or run the program from a Command Prompt.

Kermit Matthews runs Live2Tech from just outside Philadelphia. He is an IT specialist with over 20 years of experience, from a university help desk to small-business IT, IT management and his own consulting practice, and has written tech guides full time since 2020. Steps are checked against the current software on a real device or the maker’s official documentation. More about Kermit.