wall.cpp:73:81: error: declaration of 'finalHeight' as array of references
73 | void buildWall(int _n,int _k, int *op, int *left, int *right, int *height, int &finalHeight[]){
| ^~~~~~~~~~~
wall.cpp: In function 'void buildWall(...)':
wall.cpp:74:9: error: '_n' was not declared in this scope; did you mean 'n'?
74 | n = _n;
| ^~
| n
wall.cpp:75:9: error: '_k' was not declared in this scope; did you mean 'k'?
75 | k = _k;
| ^~
| k
wall.cpp:78:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
78 | left[i]++;
| ^
wall.cpp:78:15: warning: ISO C++ forbids incrementing a pointer of type 'std::ios_base& (*)(std::ios_base&)' [-Wpointer-arith]
78 | left[i]++;
| ~~~~~~^
wall.cpp:78:15: error: lvalue required as increment operand
78 | left[i]++;
| ^
wall.cpp:79:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
79 | right[i]++;
| ^
wall.cpp:79:16: warning: ISO C++ forbids incrementing a pointer of type 'std::ios_base& (*)(std::ios_base&)' [-Wpointer-arith]
79 | right[i]++;
| ~~~~~~~^
wall.cpp:79:16: error: lvalue required as increment operand
79 | right[i]++;
| ^
wall.cpp:80:12: error: 'op' was not declared in this scope; did you mean 'oo'?
80 | if(op[i] == 1){
| ^~
| oo
wall.cpp:81:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
81 | open[left[i]].pb({1, height[i]});
| ^
wall.cpp:81:17: error: invalid types 'std::vector<std::pair<int, int> > [2000005][std::ios_base&(std::ios_base&)]' for array subscript
81 | open[left[i]].pb({1, height[i]});
| ^
wall.cpp:81:34: error: 'height' was not declared in this scope
81 | open[left[i]].pb({1, height[i]});
| ^~~~~~
wall.cpp:82:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
82 | close[right[i] + 1].pb({0, i});
| ^
wall.cpp:82:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
82 | close[right[i] + 1].pb({0, i});
| ~~~~~~~~~^~~
wall.cpp:82:18: error: invalid types 'std::vector<std::pair<int, int> > [2000005][std::ios_base& (*)(std::ios_base&)]' for array subscript
82 | close[right[i] + 1].pb({0, i});
| ^
wall.cpp:84:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
84 | open[left[i]].pb({1, height[i]});
| ^
wall.cpp:84:17: error: invalid types 'std::vector<std::pair<int, int> > [2000005][std::ios_base&(std::ios_base&)]' for array subscript
84 | open[left[i]].pb({1, height[i]});
| ^
wall.cpp:84:34: error: 'height' was not declared in this scope
84 | open[left[i]].pb({1, height[i]});
| ^~~~~~
wall.cpp:85:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
85 | close[right[i] + 1].pb({1, i});
| ^
wall.cpp:85:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
85 | close[right[i] + 1].pb({1, i});
| ~~~~~~~~~^~~
wall.cpp:85:18: error: invalid types 'std::vector<std::pair<int, int> > [2000005][std::ios_base& (*)(std::ios_base&)]' for array subscript
85 | close[right[i] + 1].pb({1, i});
| ^
wall.cpp:94:35: error: 'height' was not declared in this scope
94 | add.update(j + 1, height[j]);
| ^~~~~~
wall.cpp:96:36: error: 'height' was not declared in this scope
96 | }else rm.update(j + 1, height[j]);
| ^~~~~~
wall.cpp:106:9: error: 'finalHeight' was not declared in this scope
106 | finalHeight[i - 1] = u;
| ^~~~~~~~~~~