In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to configure the c language environment in sublime text3, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Installation steps:
Configure environment variables after installation (focus)
Right-click > Properties > Advanced system Settings > Environment variables > system variables
Directly create new: variable name: C_INCLUDEDE_PATH variable value: d:\ mingw\ mingw64\ include LIBRARY_PATH D:\ mingw\ mingw64\ libpath add: new: d:\ mingw\ mingw64\ bin (no spaces in the path) gcc-v _ bin / verify the installation
Normal circumstances can't go wrong, so start your journey to sublime!
In sublime, tools > build system > new build system overrides the post-Ctrl+s with the following code
Name c and save to the default path. Then you can restart sublime, and select c in build system
Start your C language hegemony code source for CSDN blog Feijia _ Sean thank you very much
{"cmd": ["std=c++11 +", "${file}", "- std=c++11", "- o", "${file_path}\\ ${file_base_name}", "&", "start", "cmd", "/ c", "${file_path}\\ ${file_base_name} & echo. & pause "]," file_regex ":" ^ (. [^:] *): ([0-9] +): ([0-9] +): (. *) $"," working_dir ":" ${file_path} "," selector ":" source.c, source.c++ "," shell ": true," encoding ":" cp936 "
"variants": [{"name": "Build Only", "cmd": ["file_path +", "${file}", "- std=c++11", "- o", "${file_path}\\ ${file_base_name}"]}, {"name": "Run Only", "cmd": ["start" "cmd", "/ c", "${file_path}\\ ${file_base_name} & echo. & pause "]}, {" name ":" Pipe Build and Run "," cmd ": [" file_path + "," ${file} ","-std=c++11 ","-o "," ${file_path}\\ ${file_base_name} "," & "," ${file_path}\\ ${file_base_name} "," "${file_path}\ out"}, {"name": "Pipe Run Only", "cmd": ["${file_base_name}", "", "out"]}, {"name": "Project Build & Run", "cmd": ["Project Build +" "${file_path}\ * .cpp", "- std=c++11", "- o", "${file_path}\ project", "&", "start", "cmd", "/ c", "${file_path}\ project & echo. & pause "]}, {" name ":" Project Build Only "," cmd ": [" name + "," ${file_path}\ * .cpp ","-std=c++11 ","-o "," ${file_path}\ project "]}, {" name ":" Project Run Only " "cmd": ["start", "cmd", "/ c", "${file_path}\ project & echo. & pause "]}]}
Write a random program to test it: remember to save it in Ctrl+s before you can compile Ctrl+b.
(Ctrl+shift+b) choose the compilation method (a pop-up box will appear)
The first CPP: this compiles the current file and pops up a cmd command box (run the program).
The second CPP-Build-Only will only be compiled.
The third CPP-Run-Only is just to run it.
The fourth CPP-Pipe Build and Run looks in the directory where the current code is located, finds the contents of the in file (without a suffix) as input, and outputs it to the out file (again without a suffix).
The only difference between the fifth Pipe Run Only and the above is that it does not compile. It's just output.
The sixth Project Build & Run is to compile all the cpp files in the current directory into one file, and then output the file to project.exe and execute the file.
The seventh Project Build Only, only compiled, not run.
The eighth Project Run Only, only runs, does not compile.
If you are wrong, I will remind you what went wrong and be friendly.
# include void main () {
Long term=0,sum = 0
Int a, i, n
Printf ("Input a _ r n:")
Scanf ("d d", & a, & n)
For (iTunes 1)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.