🌐
Visual Studio Code
code.visualstudio.com β€Ί docs β€Ί languages β€Ί cpp
C/C++ for Visual Studio Code
November 3, 2021 - C/C++ support for Visual Studio Code is provided by a Microsoft C/C++ extension to enable cross-platform C and C++ development on Windows, Linux, and macOS. When you create a *.cpp file, the extension adds features such as syntax highlighting ...
🌐
PW Skills
pwskills.com β€Ί blog β€Ί cpp β€Ί c-programming-in-vs-code
Can I Use C Programming in VS Code? Explained in Detail!
October 30, 2025 - After building, you can use the debugger (if configured) or run the compiled executable manually. Also read: 75 Basic Programming Problems and Tutorials for Practice Β· The short answer is yes, you can use C programming in VS Code.
Discussions

guys who can explain me how to install C in VS code?
refer to the vscode documentation: https://code.visualstudio.com/docs/languages/cpp More on reddit.com
🌐 r/C_Programming
17
0
October 31, 2025
What tools do you use with Visual studio code to run C code ?
Windows has always been a pain to me since I have a potato PC and I can't run visual studio. In your case, you either Use a fully blown ready to use (bloated) IDE, like Visual Studio, CodeBlocks and CLion (Not suitable for potato PCs/Laptops). Spend some time to configure/customize your code editor, E.G. vscode or vim (or neovim). In my experience, no matter which editor you use, having a C++ installation of visual studio saves some time of configuring the PATH and toolchain directory and stuff (especially if you're a beginner). More on reddit.com
🌐 r/C_Programming
55
15
July 29, 2022
How to run a C program in Visual Studio Code? - Stack Overflow
I used to use Replit for my IDE, but I want to try Visual Studio Code (VSC) because my teacher said VSC was a great IDE to use. So I took a program I wrote a while back and put it in, but when I tr... More on stackoverflow.com
🌐 stackoverflow.com
C Language Beginners in VS Code
If you want to write C on windows, I would either look into WSL or running using like a Microsoft compiler using tools installed with Visual Studio (different from Visual Studio Code). Don’t use MinGW, WSL replaces it and is superior in every way. More on reddit.com
🌐 r/vscode
10
1
July 14, 2025
🌐
freeCodeCamp
freecodecamp.org β€Ί news β€Ί how-to-write-and-run-c-cpp-code-on-visual-studio-code
How to Write And Run C and C++ Code in Visual Studio Code
January 20, 2023 - After writing your code, you can run the code directly using the play button you'll find in the upper right corner. This is how you can run any C/C++ program from VS Code/Insiders
🌐
DEV Community
dev.to β€Ί haythammostafa β€Ί run-c-code-in-visual-studio-code-2j86
Run C Code in Visual Studio Code - DEV Community
July 3, 2023 - 8) As we click on the Continue, it shows the below image. In the MinGW Installation Manager, we need to check the Mingw32-base package, Ming32-gcc-g++ package and Ming32-gcc-objc package to run and compile the C/ C++ program in the visual studio code.
🌐
Kodersolution
kodersolution.com β€Ί home β€Ί articles β€Ί c programming in vs code: complete gcc setup guide
C Programming in VS Code: Complete GCC Setup Guide | Kodersolution
September 30, 2026 - Learn how to configure C programming in VS Code step-by-step using GCC (MinGW-w64), build tasks.json, set up GDB debugging, and fix common PATH errors.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com β€Ί items
C/C++ - Visual Studio Marketplace
Extension for Visual Studio Code - C/C++ IntelliSense, debugging, and code browsing.
🌐
Reddit
reddit.com β€Ί r/c_programming β€Ί guys who can explain me how to install c in vs code?
r/C_Programming on Reddit: guys who can explain me how to install C in VS code?
October 31, 2025 - Showcase: I created Install C - Fast and Simple One-Click Installer for the entire C development toolchain. ... C with VsCode, I want to learn C on visual code and I’m a noob, which extension have I to install, in order that my code works, and the steps to make it work, ty for your help
🌐
Medium
medium.com β€Ί @hasanmcse β€Ί step-by-step-guide-to-develop-c-c-program-using-vs-code-faef2bb88995
Step-by-Step Guide to Develop C/C++ Program Using VS Code | by Engr. Md. Hasan Monsur | Medium
January 9, 2026 - A clear beginner-focused guide to developing C/C++ programs using VS Code, highlighting how it improves productivity compared to older IDEs…
Find elsewhere
🌐
Medium
medium.com β€Ί @ochwada β€Ί c-programing-setup-in-visual-studio-code-bd4cb60e58ff
C Programming β€” Setup in Visual Studio Code | by Ochwada | Medium
November 16, 2024 - HEADER_H is a macro that is defined when the header is included for the first time, so if the file is included again, the content between #ifndef and #endif is ignored. ... This defines a macro PI with the value 3.14159, representing the mathematical constant Ο€. This value can be used throughout the program wherever PI is referenced.
🌐
Visual Studio Code
code.visualstudio.com β€Ί docs β€Ί cpp β€Ί config-mingw
Using GCC with MinGW
November 3, 2021 - Remember, the C++ extension uses the C++ compiler you have installed on your machine to build your program. Make sure you have completed the "Installing the MinGW-w64 toolchain" step before attempting to run and debug helloworld.cpp in VS Code.
🌐
YouTube
youtube.com β€Ί watch
How to Setup C/C++ in VS Code [Updated 2025] Complete Installation with example | Amit Thinks - YouTube
Learn how to setup and run C/C++ on VS Code. We will also run an example C file after the setup.C Tutorial (English): https://youtu.be/CobHIiQXMtQC Tutorial ...
Published: January 15, 2025
Top answer
1 of 2
3

The guide for using C++ with Visual Studio Code is located here:

  • C/C++ for Visual Studio Code

If you are using the windows operating system, you can install the Microsoft Visual C++ (MSVC) compiler toolset as described here:

  • Configure VS Code for Microsoft C++

Otherwise you should read the tutorials for the compiler you want to use:

  • Tutorials for other compilers

The reason I refer to links, instead of explaining the details here, is because the answer might become outdated/obsolete. Sometimes links are better than explanations.

2 of 2
2

Step 1. Download the MinGW - Minimalist GNU for Windows at SourceForge, link here.

When you download Minimalist GNU for Windows (MinGW), you can choose which packages to install. You should select the following packages:

  • mingw-developer-toolkit
  • mingw32-base
  • mingw32-gcc-g++
  • msys-base

Then click on the Installation tab on the top left and click on Apply Changes.

After installation, go to your C Drive where the MinGW is installed, and enter the folders MinGW > bin. Copy the path C:\MinGW\bin

Now search for environment, and enter edit environment variables for your account. screenshot

Next, double-click on Path, click on New, paste the path C:\MinGW\bin, press enter, and click OK.

Verify that it has been installed correctly by opening up Command Prompt and typing in gcc --version. It should give you the current version number.

Step 2. In Visual Studio Code, click on the Extensions tab, search and install Code Runner by Jun Han

Step 3. In the C/C++ Configurations. Make sure the Compiler Path has c:/MinGW/bin/gcc.exe selected. screenshot 2

You can get to it by opening Command Pallet (ctrl+shift+p) typing in C/++: Select a Configuration.. then select Edit Configurations (UI)

🌐
YouTube
youtube.com β€Ί watch
How to Setup C/C++ in Visual Studio Code | VS Code Installation for C/C++ - YouTube
In this video, I’ll guide you step by step on how to set up C and C++ in Visual Studio Code (VS Code) – including installation, compiler setup, extensions, a...
Published: September 22, 2025
🌐
YouTube
youtube.com β€Ί coding wallah sir
How to install C & C++ in Visual Studio Code | Setup VS Code for C & C++ Programmers [ 2024 ] πŸš€ - YouTube
how to install c in visual studio codehow to install c++ in visual studio code windows 11visual studio code, vs code, c programmingC++ Tutorial One Shot - ht...
Published: April 26, 2024
Views: 150K
🌐
YouTube
youtube.com β€Ί amit thinks
How to run C program on Visual Studio Code - YouTube
Learn how to run a C program on Visual Studio Code. VS Code is a free source code editor developed by Microsoft.Install Visual Studio Code: https://youtu.be/...
Published: October 2, 2020
Views: 281K
🌐
YouTube
youtube.com β€Ί watch
How to Run C/C++ Program in Visual Studio Code [2024] | Run C & C++ in VS Code - YouTube
Learn Step by step tutorial on How to Create & Run C/C++ Program in Visual Studio Code using (gcc /g++ /gdb) on Windows 11/10 for C & C++ programming. Visua...
Published: September 2, 2024
🌐
YouTube
youtube.com β€Ί mr about tech
How to Run C and C++ Programs on VS code? - YouTube
In this video, I have shown how you can install gcc and g++ compilers to run C and C++ program from Visual Studio Code. Note: Install Code Runner extension o...
Published: June 22, 2019
Views: 398K
🌐
Stack Overflow
stackoverflow.com β€Ί questions β€Ί 79048119 β€Ί how-to-run-c-in-vs-code
How to Run C in VS Code - Stack Overflow
2. Make sure the executable main.exe is mentioned in your launch.json file in the .vscode folder of your project. If you need more details check out my guide Setup Guide for C/C++ Programming on VSCode ... you should check the launch.json file. thats where the visual studio code parameters are.