/* How to use it? 1) Sublime => Tools => Build System => New Build System 2) Copy paste this code into .sublime-build file 3) Save it as C++_Terminal.sublime-build 4) Select Sublime => Tools => Build System => C++_Terminal.sublime-build 5) Open .cpp file write some code. 6) ctrl + b to run your code. NOTE: default standard is c++17. */ { "cmd" : ["g++", "-std=c++17", "${file_name}", "-o", "a.exe", "&&", "start", "cmd", "/c", "a.exe & echo. & pause"], // remove "& echo. & pause" to automatically close terminal // "cmd" : ["g++", "-std=c++17", "${file_name}", "-o", "a.exe", "&&", "start", "cmd", "/c", "a.exe"], "shell" : true, "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir" : "${file_path}", "selector" : "source.cpp, source.c++", }