
Visual Studio Code for C/C++ in Windows 11: Beginner’s Guide
Unleash the coding power of Visual Studio Code on Windows 10, 11! Simple steps for beginners to setup VS Code for C and C++ in no time.
What is Visual Studio ?
Visual Studio is a development software from Microsoft. It is the best-integrated development environment (IDE). The fascinating thing about it is that you can enjoy all its amazing features for free. It is used to build, write and debug code in any language as it has all the popular languages like HTML, C, C++, JavaScript, CSS, Python, etc. It has many interesting features so that you can write code in it and develop different types of projects in it. It also produces websites, web apps, and many other projects. It has many uses, as it can be used to develop software, code editing and productivity, debugging and testing, Application lifecycle Management (ALM), Extensibility, Azure Cloud Development, and many more.
What is Visual Studio Code?
Visual Studio Code is shortly called VS Code. It is a code editor developed by Microsoft. It is a very lightweight, free, and reliable source code editor. It has a wide range of extensions and features. And due to its amazing properties, it is very popular among other web technologies and developers for various programming languages. Different tasks concerning coding and development can be done by vs. code. VS Code has hundreds of languages, which means you can code in any language you want like c, c++, java, python etc. It also has some shortcuts that will help you work with it more easily. You can customize it using themes that you can set according to your choice, dark, light, high contrast, or any theme to like.
What is C++ language?
C++ is an extension of the C programming language. It is a powerful and hybrid programming language. It has some features of Object-oriented programming (OOP), some are low-level manipulation, and some are Strong Typing and Static Binding. It also has a feature of Standard Template Library (STL) and Performance. It is compiled language. It is also a universal programming language. It has a wide range of applications and domains. It can be used in system programming, Game development, Application Development, Libraries and Frameworks, networking and communication, High-performance Computing, Financial and trading systems, Cryptography and Security, Education and Learning, Artificial Intelligence and Machine Learning, and much more.
How to set up Visual Studio Code for C and C++?
After you learn what Visual Studio Code is and what it is used for, you can now know how to set it up. So here are some simple steps to set up VS code (Visual Studio Code) for beginners. It is a bit time-consuming but very easy and interesting. Here they are:
Step no.01:
Download VS Code for Windows. You can download it from its original website, visualstudio.microsoft.com.
Step no.02:
Download MinGW. For this, you must type MinGW install in the search bar of Google. Go to the link of SourceForge.
Then download it.
Step no.03:
Go to your downloads; there will be a MinGW get setup. Click the link and open it. Click on the install button.
Then click on the continue button.
After complete loading, click on the continue button. Then click on mingw32-gcc-g++ and mingw32-base and mark them for installation.
Step no.04:
There will be an installation button at the top left side; click on it first, then click Apply Changes.
Click on the Apply button.
Then you must wait patiently for the loading to be completed. After everything is loaded, you can close the MinGW tab.
Step no.05:
Now, there will be a MinGW folder in your local Disk C. Furthermore, there will be a folder called bin. Click on it. After that, your pathway will be on the top of the screen.
When you click on it, it will become a link, and you must copy it.
Step no.06:
Go to your Settings, then Systems, then About. There are in the device specifications, and then there will be an icon of Advance system settings.
After that, you must click on Environmental Variables…
Then double-click on Path.
After double-clicking, there will be an option for New.
After clicking on New, paste the link of the MinGW you have copied.
Then just Ok it all.
Step no.07:
Now open the VS Code. Go to extensions and type c c++ on it, and install the following extensions:
You can install a themes pack, too, if you want interesting themes!
Then type code runner and install the following extension:
Make a folder whose name ends with .cpp; this is a shortcut for coding in C++. Then write a code and check if it runs.
And enjoy coding 🙂