How to Install & Setup VS Code for Running C++ Programs
How to Install & Setup VS Code for running C++ Programs
To run C++ programs in Visual Studio Code, you need to download and install the VS code on your computer.
Follow the steps given below:
Step 1: Download the VS Code by clicking here.
Step 2: Install VS code as soon as the downloading completes.
<|ADIA|>
Step 3: To compile C++ programs, you need to install the MinGW compiler. Click here, and downloading will start shortly.
Step 4: Install the MinGW compiler.
<|ADIA|>
Step 5: Now, you need to add MinGW to the path. Go to This PC→C:/→Program Files (x86)→mingw-w64→i686-8.1.0-posix-dwarf-rt_v6-rev0→mingw32→bin.
Step 6: Copy the path and paste in the environment variables. Right-click on This PC→Properties→Advanced System Settings→Environment variables.
<|ADIA|>
Step 7: Click on the path and then Edit→New. Paste the copied path here and click ‘ok.’
Step 8: Now, open VS code and download the C/C++ extensions as shown in the below animation:
<|ADIA|>
Step 9: To run the C++ programs easily on the VS Code, you need to install another extension called “Code Runner.”
With this, you are all set to run your C++ programs in the VS code. Let’s write a Hello World program to make sure that everything is working correctly.
<|ADIA|>
In the above animation, you can see that the Hello World program is running correctly. So, that’s how you can easily set up the VS Code to run C++ programs on your computer.
Comments
Post a Comment