You are currently viewing How to Run C++ Program in Visual Studio Code | vs code Setup For C++ on window #C++ #vscode
How to Run C++ Program in Visual Studio Code

How to Run C++ Program in Visual Studio Code | vs code Setup For C++ on window #C++ #vscode

Hi guys today we learned how to install a C++ program in Visual Studio. I will give you very simple steps just follow the steps that I am providing in this list.

I hope you will learn How to Run C++ Program in Visual Studio Code easily through this guide .

Simple Steps to install or run c++ program in visual studio

Step 1. Just go to google.co.in and type mingw compiler.

Click on this link you will redirected to the main website for visual studio installation

Link: Here

Here is the main website looks like by using this compiler you will easily compile C++ code in your visual code by setting very small tweaks.

How to Run C++ Program in Visual Studio Code

You will see so many tabs like summary, Files and other option but for now click on files . You will get the list like this .

How to Run C++ Program in Visual Studio Code

To download the latest version of the software click on Download latest version of MinGW after clicking on the download interface will look like this .

How to Run C++ Program in Visual Studio Code

Install this by following the next procedure for any software is required .

Here is the steps you have to follow for during installation

How to Run C++ Program in Visual Studio Code

Next step is to mark all the installation from the list .

How to Run C++ Program in Visual Studio Code

After selecting all from the check box, you have to apply all the changes .

and then apply the changes.

Step 2.

After installation of the compiler, you have to go to C Drive where all the program files are there.

in the list of folders there is a MinGW folder is there .

Open this folder again click on the bin folder and copy the path.

and then you have to set the environment so that you don’t have to run again and again by typing to the particular path.

You have to go to System environment variables and set the path for your software. Here you have to click on Environment Variable

Double Click on the path and paste the path by clicking on New and Add new path variable .

Then you have to make a folder so that you can run your files and compile your programs.

Next step open that folder in visual code and make a file first.c++

also one more step you have to install an extension which is

Also install this extension too .

Now all the steps is all most completed you can run the c++ program easily by clicking on run button .

Now you have successfully install the c++ compiler and you are able to run c++ code in your PC.

 

Setting For User Input

You have to go on code runner extension info pannel. Which will look like this

Click on the extension setting and make these changes to get the input from the user .

Conclusion

I hope this tutorial was helpful. Please leave a comment with any recommendations for another tutorial. In the future days we will cover more advanced projects as well so stay tune more tutorial like this .

People are also reading: