This is true pit, feeling devc ++ to write c program in particular unhappy, so I used the sublime, however, there are many problems compile time,
put the following I stepped pit recorded
- tools> Build System> New Build System written
{
"cmd": ["gcc", "${file}", "-fexec-charset=gbk","-o", "${file_path}/${file_base_name}", "&", "start", "cmd", "/c", "${file_base_name} & echo. & pause"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": true,
"encoding":"cp936",
}
- C.sublime-build can be saved as
- Then ctrl + shift + b c compiler selection
This will be successful