title: Compiling program as c++ 14 in Sublime Text 3 as default
body: <p>I know that we can compile program as C++ using g++ compiler. But g++ compiler defaults to 98 version. To run it as C++ 14, we need to add <code>-std=c++14</code> in terminal. </p>
  
  <p>Sublime Text is considered a valuable editor for competitive programming due to its light weight and features. In these competitions time is important and thus the time is wasted in copying in text file and then running from terminal. C++ 14 features a rich library and other important features in comparison to 98. Thus one would desire to be able to compile the code on sublime text and as C++ 14.</p>
  
  <p>But how can I make sure that when I compile the code within Sublime Text 3, it compiles as default to C++14?</p>
  
  <p>After some fiddling around I came up the following solution -</p>
  
  <ol>
  <li>Go to packages and extract C++.sublime-package</li>
  <li>Open C++ Single File.sublime-build</li>
  <li><p>Change</p>
  
  <pre><code>"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" &amp;&amp; \"${file_path}/${file_base_name}\""
  </code></pre>
  
  <p>to</p>
  
  <pre><code>"shell_cmd": "g++ -std=c++14 \"${file}\" -o \"${file_path}/${file_base_name}\" &amp;&amp; \"${file_path}/${file_base_name}\""
  </code></pre>
  
  <p>Added <code>-std=c++14</code> in both build and run</p></li>
  <li>Save it and overwrite package originally in Sublime Text 3</li>
  </ol>
  
  <hr>
  
  <p>Is this the right way to do so? It is named as single file - Is this something to worry about if I want to use multiple files ?</p>