Vs code is very useful IDE and 100times better IDE than turbo C which is recommended by colleges. Here we are sharing simplest method to install MinGW and run a C++/C program without any errors .
a lot of vs code installation guide available on internet this is the simplest one when i was trying to follow the available methods i got many issues then i found this one. mainly the erorrs occurs due to wrong installation of MinGW.
Here I am sharing My MinGW Backup which is customize for graphics.h too.
Open this file using 7zip and directly extract it to C:\.
Now Open CMD and type gcc --version
Now Go to search and search Edit the system environment variablesSelect Edit the system environment variables.
- goog_105879234Click On environment variables.
- Select path available on System variables
- Then New and add C:\MinGW\bin on it.
- exit.
Now Download Vs code And simply install it.
Here You Found a window Like this
Goto File Manager and create a folder.
Select Open Folder choose the folder you created.
Now You have to install some extensions.
Now open Settings
Search For Run in terminal and Tick it.
Now Write Your First Program
#include<iostream>
using namespace std;
int main()
{
int num1,num2,area;
cout<<"Enter value of num1: ";
cin>>num1;
cout<<"enter value of num2: ";
cin>>num2;
area=num1*num2;
cout<<"Area =: "<<area;
return 0;
}
Click on code runner icon
Give Your Input