Setup Visual Studio Code for Writing C / C++ Programs in Windows 10.

For Writing C Program in Visual Studio Code you need following libraries which i will show how to download and install it

 

  1. Visual Studio Code
  2. MinGW
  3. GCC compiler
  4. Add Environmental Variable

 

Visual Studio code is great tool given by microsoft as a open Source . It is light weight Editor With Add Plugin Facility . You can writing almost any type language in it . You can add any type of plugin for any languages as you want . Even You install Typings for any Language of your like to enable intelliSense which really helps you in writing a program .

MinGM is Package Manager From here you can download many libararies and compilers for different langauges Like C,C++ ,Ada , C objective Compiler and many More

 

Steps to setup Visual Studio Code for C / C++

  • Download MinGW from here and there will left hands Download installer Button will be there just downlod installer and Install it as you install you will get this screen
 
 
  • As you get this screen click on gcc-g++ compiler you will be ask to mark as installation . Then go in the installation option above left hand side and click apply changes then click ok . All your Libraries will be downloaded in C:\MinGW folder.
  • Then go to my computer right click and go to properties.
  • Click On system Protection
  • Click On Environment Variables
  • Now Select Path in Click on Edit
  • Now Click New Button and add c:\MinGw\bin folder to it and then click ok .

 

Congratulation now you are all set to rock for writing c program in Visual Studio Code . Open Visual Studio Code Now and Create new file name as helloworld.c . Now Press (ctrl+`) to open integrated terminal provided by visual studio code

and type

 

gcc helloworld.c

./a (to run program)

  • Download Visual Studio Code from here

 

 

#include <stdio.h>
#include <conio.h>

int main()
{
printf("Hello World");
return 0;
}




Taher Ali Badnawarwala

Taher Ali, drives to create something special, He loves swimming ,family and AI from depth of his heart . He loves to write and make videos about AI and its usage


Leave a Comment


No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *