First you have to download it.
This is the cpp,c++,gcc,g++ I left behind when I installed Codeblocks.
The second step is to create an environment variable
The three configurations are complete, OK.
Then go to sublime Text 3, locate the tool (tools), and in the compilation system, select the new compiled system.
Because it is a C + +, it will use the IO stream such as cin,cout, this time need to use CMD and then add the following code:
{ "Working_dir":"$file _path", "cmd":"gcc-wall \ "$file _name\"-o \ "$file _base_name\"", "File_regex":"^(.. [^:]*]:([0-9]+):? ([0-9]+)?:? (.*)$", "selector":"source.c", "variants": [ { "name":"Run", "Shell_cmd":"gcc-wall \ "$file \"-o \ "$file _base_name\" && \ "${file_path}/${file_base_name}\"" } ]}
The path is the default path, and the name is "Name.sublime-build" so that name is taken and saved.
Pressing the key combination "Ctrl" + "Shift" + "B" will pop up the compile Command Selection window, select "Name-run" compile, and the result will appear in the console below sublime.
Then just press "Ctrl" + "B" to
Direct compilation of C + + with sublime Text3