Advertisement
sleepy_coder

C++11 for Sublime Text 3

Nov 9th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.17 KB | None | 0 0
  1. this is the configuration for sublime text 3 to use C++11/14 and file input/output system
  2. first ensure that your codeblocs bin path is added to Path of your pc..
  3. and you can use this types of Main function
  4.  
  5. int main(){
  6. #ifdef LOCAL
  7.     freopen("input.txt", "r", stdin);//program will take input from this file
  8.     freopen("output.txt", "w", stdout);//output will be printed here
  9. #endif
  10.     //ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  11.  
  12.  
  13.    
  14.    
  15.  
  16.     return 0;
  17.    
  18. }
  19.  
  20.  
  21.  
  22. //this is the format for build file name it like C++_RUN
  23. //_______________________________________________________________________________________________
  24. {
  25.     "shell_cmd": "g++ -D LOCAL \"${file}\" -std=c++14 -o \"${file_path}/${file_base_name}\"",
  26.     "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
  27.     "working_dir": "${file_path}",
  28.     "selector": "source.c, source.c++",
  29.  
  30.     "variants":
  31.     [
  32.         {
  33.             "name": "Run",
  34.             "shell_cmd": "g++ -D LOCAL \"${file}\" -std=c++14 -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
  35.         }
  36.     ]
  37. }
  38. /__________________________________________________________________________________________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement