How to build C/C++development environment with vscode
1、 Install the C language compilation environment gcc
1.1 Linux/Mac operating system comes with gcc/g++compiler, which does not need to be installed
1.2 The C/C++compiler for Windows can download a mingw
1.2.2 Configure gcc/g++Environment Variables
2、 Install vscode and get familiar with some shortcut keys
2.1 Familiarize yourself with shortcut keys
2.2 Personal preference configuration
3、 Write C++code
3.1 Create a new. cpp file, open the terminal window, and use the cd command to switch to the file path
3.2 Write a small program to save it. It is recommended to use Ctrl+S skillfully
3.3 Press Ctr to the command line, compile and run the code in the terminal window
Powershell
g++ test.cpp -o test ; ./test
cmd
g++ test.cpp -o test && test
Bash Shell(Linux)/Mac OS terminal
3.4 Repeat the operations in 3.2 and 3.3 to quickly modify the operation procedure
The following GIF demonstrates how to modify the output result of the program (the second run, the output result has an extra line of 'c.cpp')
The last thing I want to say