Stdio.h = stdio.h = stdio.h = stdio.h = stdio.h = stdio.h After a struggle, finally configured, the following to share with you ~
precondition
- Download the vs code
Official website: code.visualstudio.com/
- Download the MinGW
Official website: www.mingw.org/
Because it is a foreign website so the loading will be slow, but also through the computer housekeeper software management what to install, effective test, the effect is the same ~
Step 1: Install VS Code and MinGW
The installation step is easy, just double click and keep clicking next
However, the NEWLY downloaded VS Code is in English. If you need to configure it in Chinese, you need to change the Settings
Click the icon at the bottom of the left to search For Chinese and find the Chinese language package to download
Press Enter and select zh-cn
Step 2: Configure MinGW environment variables
If this step is not configured, it can be used only in the MinGW bin folder, so you need to configure ~
- Open advanced Settings on your computer
Right-click the computer and click on properties
Click Advanced System Settings
- Click on environment variables
After entering advanced Settings, click environment Variables
- Find path in the system variable and add the bin directory for MinGW
Scroll down to find Path and click Edit
Locate the directory where MinGW is installed and locate the address of the bin folder
Each person’s installation location may be different, I this is the default installation directory has not changed, find their own installation directory
When the window pops up, click New and paste the address you just copied to
The CMD command window is displayed
If the configuration is not configured or unsuccessful, it will look like this
If the configuration is successful, it will look like this
Step 3: Open configuration in VS Code
- Open vs code’s C++ configuration file
Use the shortcut key CTRL +shift+p to open the search bar and type C++
Open the schematic configuration file
- Add header files from the include folder in the MinGW directory, e.g. “C:/MinGW/include/**”
- Add the last folder name from the previous image to the C++ configuration file
C :\mingw\bin\.. c:\mingw\bin\.. / lib/GCC/mingw32/4.6.2 / include/c + +
To c: / mingw/bin /.. / lib/GCC/mingw32/4.6.2 / include/c + +
All file directories are double quotation marks with English punctuation at both ends. If not, an error may be reported
After adding it, it looks like this:
Remember to save the changes after typing #include stdio.h