To compile C/C++ programs, you need to install the MinGW compiler.
Follow the steps given below:
Step 1:
Download the MinGW by clicking here.
Step 2:
Open the file and extract it into your (C:) drive.
Step 2:
After extracting locate the MinGW folder in your (C:) drive and open it.
Step 3:
Open the bin folder.
Step 4:
Now copy the path by right click on bin –> copy address.
The address should be C:\MinGW\bin
Step 5:
Now go to This PC, right-click and go to the Properties.
or, go to your device Settings–>System–>About–>Advanced system settings.
Step 6:
Open Advanced system settings.
Step 7:
Open Environment Variables.
Step 8:
Select Path and then click on Edit.
Step 9:
Click on New and paste the copied path and click on OK.
Step 10:
Closed all the dialog boxes by clicking on OK.
Now if you want to check if the installation is done or not, go to the command prompt of your PC and type gcc --version
and then press enter.
If you can see this type of message, congratulations you have successfully installed the MinGW compiler on your windows machine.