How to Write And Run C and C++ Code in Visual Studio Code

The full procedure of running C/C++ codes using the Visual Studio Code


Md. Fahim Bin Amin

13 days ago | 1 min read

For a pretty long time, I was hearing many complaints from a lot of people that they are failing to run their C/C++ codes directly from the Visual Studio Code.

So, I thought about writing a full-fledged article on this on freeCodeCamp.

You need to check something sequentially. I am providing those step by step here:

1. You have to ensure that you have correctly installed the compiler for the C/C++ program whether you are using a Windows, Linux or Mac based operating system.

2. You have to check whether your compiler is working correctly or not. If you are a Windows user, then you also need to ensure that you have added the compiler's directory to the environment path variables. For this, make sure to check this article from freeCodeCamp.

3. I can pretty much assume that you have already ensured that your machine has the compiler installed and configured successfully if that passes the previous point. Now, it is time to install and configure the [VS Code]( properly. For this, simply head over to this article.

That's it! 😀

You may follow me on:

➡ Twitter: [Fahim_FBA](

➡ LinkedIn: [fahimfba](

➡ GitHub: [FahimFBA](

➡ English YouTube Channel: [Fahim Bin Amin - English](

➡ Bengali YouTube Channel: [Fahim Bin Amin - Bengali](

➡ Blog (Powered by Hashnode): [Articles and Contents by Fahim](

➡ Website: [](


Created by

Md. Fahim Bin Amin

Microsoft Research Investigation Contributor to OSS || Open Source Contributor

Microsoft Research Investigation Contributor to OSS || Open Source Contributor || Competitive Programmer || Tech-enthusiasts || Student of Computer Science and Engineering at United International University







Related Articles