Advertisement
Necto

Untitled

Sep 22nd, 2022 (edited)
905
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. {
  2.     "range-based for": {
  3.         "prefix": "fe",
  4.         "body": [
  5.             "for(auto const &i : arr) {",
  6.             "\t$0",
  7.             "}"
  8.         ],
  9.         "description": "for each c++ implementation"
  10.     },
  11.     "for in for": {
  12.         "prefix": "ffor",
  13.         "body": [
  14.             "for(int i = 0; i < l; ++i) {",
  15.             "\tfor(int j = 0; j < l; ++j) {",
  16.             "\t\t$0",
  17.             "\t}",
  18.             "}"
  19.         ],
  20.         "description": "loop in a loop"
  21.     },
  22.     "filling array": {
  23.         "prefix": "inp",
  24.         "body": [
  25.             "int n;",
  26.             "cin >> n;",
  27.             "vector <int> vec;",
  28.             "for(int i = 0, a; i < n;++i){",
  29.             "\tcin >> a;",
  30.             "\tvec.push_back(a);",
  31.             "}$0"
  32.         ],
  33.         "description": "adding n ints to vector"
  34.     },
  35.     "new main file": {
  36.         "prefix": "start",
  37.         "body": [
  38.             "#include <iostream>",
  39.             "#include <vector>",
  40.             "#include <string>",
  41.             "using namespace std;",
  42.             "int main () {",
  43.             "\t$0",
  44.             "\treturn 0;",
  45.             "}"
  46.         ],
  47.         "description": "basic start if new file"
  48.     },
  49.     "rus locale": {
  50.         "prefix": "rus",
  51.         "body": [
  52.             "setlocale(LC_ALL, \"Ru\");"
  53.         ],
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement