Sublime Text 3 implements the compile and run example of C++ code

  • 2020-05-30 20:35:27
  • OfStack

In the compilation of data structure code, I chose the excellent editor Sublime Text 3, but it took me a lot of trouble to compile and run the C++ code. Next, I will post the code of C++ compilation system for your reference.

When compiled, it runs in the CMD command line window that pops up, because if it runs in Sublime Text 3, it may not be possible to do things like input (?). .

  "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++",
    "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\""

The above code also avoids the garbled phenomenon caused by coding problems.

This article is the entire content of the Sublime Text 3 implementation C++ code compilation and running examples from this site. Hope you enjoy

If you want to know more about the game activities and game strategy, please continue to pay attention to this site, this site will be in the first time for you to bring the most beautiful, the most fun, the most fresh game information. More exciting content on jb51 game channel!

Related articles: