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.
Note: 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.
Quick Answer
Download Visual Studio Community, run the installer, check Desktop development with C++, select Install, then create a new Console App project and press Ctrl + F5 to run it.
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.
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.
Troubleshooting
- “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.
Frequently Asked Questions
Is C++ free on Windows?
Yes. The compilers and editors above are free for personal use.
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.
Summary
- Install Visual Studio Community with Desktop development with C++.
- Or install MSYS2’s GCC and Visual Studio Code.
- Build a Console App or compile with g++ to test your setup.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.