小编给大家分享一下Sublime Text 3怎么实现C++代码的编译和运行,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
编译后是在弹出的CMD命令行窗口运行的,因为若在Sublime Text 3运行则可能无法实现输入等操作(?)。
{
"encoding": "utf-8",
"working_dir": "$file_path",
"shell_cmd": "g++ -Wall -std=c++11 -fexec-charset=GBK \"$file_name\" -o \"$file_base_name\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.c++",
"variants":
[
{
"name": "Run",
"shell_cmd": "g++ -Wall -std=c++11 -fexec-charset=GBK \"$file\" -o \"$file_base_name\" && start cmd /c \"\"${file_path}/${file_base_name}\" & pause\""
}
]
}
看完了这篇文章,相信你对“Sublime Text 3怎么实现C++代码的编译和运行”有了一定的了解,如果想了解更多相关知识,欢迎关注天达云行业资讯频道,感谢各位的阅读!