Sublime Text 2 Run C++11 Code
问题 I have the following code in Sublime Text 2: #include <iostream> #include <string> using std::cout; using std::string; int main() { string s("some string"); if (s.begin() != s.end()) // make sure s is not empty { auto it = s.begin(); // it denotes the first character in s *it = toupper(*it); // make that character uppercase } cout << s; return 0; } I can build C++11 code in Sublime by pressing ctrl-B as I changed my C++.sublime-build file to "cmd": ["g++", "-std=c++11", "${file}", "-o", "$