我想在崇高的文本3中编译我的C++程序并在cmd中运行它。为此,我创建了一个新的构建系统(工具 - >构建系统)。如何在sublime构建文件中添加双引号?
{
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": "true",
"variants":
[
{
"name": "Run",
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}" ,"&&","start", "cmd", "/k", "$file_base_name"],
"shell": true
}
] }
此执行:
g++ file_location -o file_location && start cmd /k file_location
我想要实现的(因此,它拥有执行完毕后,在屏幕上,并应退出上按下CMD任意键):
g++ file_location -o file_location && start cmd /c "file_location && pause>nul"
(即将k
替换为c
并实现双“ ES)
我试图\"
不是传递"
的,它通过整个\"
,其产生错误在CMD。
我该怎么办?
倒置逗号,你的意思是*单引号*?和双引号*双引号*? –
Y ............ –