Configuration method
There are many tutorials on FOR small white , but they are all uneven.
I want to write a complete summary for Xiaobai configuration
step1. Download Vscode
Download the vscodewin10 version on the vscode official website . Friends who use the Linux version are similar.
step2. New file
Open vscode, then create a new file main.cpp, and then type the content
#include<iostream>
using namespace std;
int main()
{
cout<<"hello c++"<<endl;
}
As shown
step3 install plugin
Then install the plug-in,
then search in the search bar, install the following plug-in
Beautiful to beautify your compilation interface.
Chinese is to install the Chinese translation, so that the interface of the compiler becomes the Chinese version
c/c++ and code Runner is used when debugging. After installing this plug-in, there will be a triangle in the upper right corner for debugging. As shown in the figure:
Click to run the program written by yourself, but the road has not been finished, and now it is impossible to debug, it will report an error, and then go down.
step4 download MinGW
Then go to download MinGW, you can go to the official website to download, directly search the MinGW official website on Baidu and download it according to the prompts.
Here I provide the download link of my network disk: Link: https://pan.baidu.com/s/1WWi5tX02qk0b-AGyv13Yxg
Extraction code: 8twc
After downloading, unzip it to the location you want-it is recommended to go to the c drive (to Remember the installation location).
step5 configure the environment (the most important step)
Then start to configure the environment, the steps are very simple. Just follow along.
1 Search for environment variables in the start menu bar to update your own system environment variables,
then open the environment variables
and start to configure the environment variables. Copy your MinGW\bin location, remember it is the bin location, there are many tutorials on the Internet that include the location, this is an error of. Remember to
click on the bin to confirm. So far, the configuration of Vscode+c++ environment has been configured.
step6 test
Click the small triangle symbol to test before,
and the configuration of vscode and c++ is completed.
I changed the output in the terminal here.
Then search for Run in Terminal and check it.