How to compile your C++ code in Visual Studio Code?
The Visual Studio Code (otherwise commonly known as the VS Code), embedded by the team of Microsoft is one of the top compilers in the game for coding in different languages.
C++ being one of the most basic coding languages is currently in high demand in every field from technical to commercial.
Keep reading to learn how you can compile your code in C++ or C using the online C++ compiler Visual Studio Code.
Visual Studio Code being a Microsoft prodigy is one the first compilers which came up with the “auto code completion” feature. Setting up the IDE in your PC rather than using an online C compiler will save you a ton of hard work.
Setting up Visual Studio Code
Many of you might not be acquainted with the fact that C++ marks the origin of many programming languages that are being used till date.
Well, coding using the C++ language will require setting up the software in your PC or laptop before you start executing the program.
Firstly you have to start with installing the toolset or software for C++ and C which is known as “mingw”. Once the toolset has been installed and set up on your computer, you will proceed further and install the software for Visual Studio Code.
The software for Visual Studio Code will be available in the form of a shortcut in the Windows tool pane of your desktop.
Launch the software and follow the instructions mentioned below:
Head to install extensions
After launching the software for Visual Studio Code you will observe an icon for downloading extensions on the extreme bottom at the left corner of your screen. Click on it.
Install a few extensions
The next step is to search for online extensions such as C++ and C in the search bar. In order to install the extension make sure to click on it and head to the “Install” option in the page pop-up.
The extensions for C++ and C include features like Intelligence and Debugging.
Now, all you have to do is install the “code runner” extension as well since this is what will facilitate running the C and C++ programs easily in the Visual Studio Code IDE.
Restart Visual Studio Code
Now that you have downloaded the required extensions for running the program smoothly, you are required to restart the Visual Studio Code.
.png)
Comments
Post a Comment