First of all you have to download the vscode. you can download the vs code with the help of this link. You can download the visual studio code editor, depending upon the operating system you are using.
Now we have to install GCC(compiler) for vs code. And you can download it from the MinGW SourceForge page.
Look for MinGW-get-setup.exe for downloading. Download it and launch the installer. Accept the terms.
Now you will see that the installer is connecting to the Internet and downloading a lot of files.
when the files are done, (you'll be presented a window with the title MinGW Installation Manager. You should be in the 'Basic Setup' tab by default when it launches. If not, click on Basic Setup.
Out of the numerous checkboxes presented to you on the right side, tick "mingw32-gcc-g++-bin". If you are prompted with a menu, click on Mark for Install.
Then on the top left corner click on Installation > Apply Changes. And wait while it downloads a billion files and installs them.
Now you gotta edit your "Environment Variables" as well, so that gcc works in cmd no matter the file location.
For that go to Windows Explorer > Right-click on This PC > Properties > Advanced system settings > Environment Variables or you could just search for "Environment Variables" in Windows Search...
At the bottom "System Variables" panel, look for a Variable named "Path" and double click on it. Some systems show a good UI for adding a New Path easily (by clicking New), else you just need to add; at the end and add the following path.
⦁ Click on OK, and OK and close the other windows. Open a Command Prompt Terminal and try typing gcc --version and press Enter. If you see a version that means you have sucessfully installed.Cheers and happy coding!