Problem | GSS |
---|---|
User | Johnnie |
Submission Time | 2023-08-14 14:40:48 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
GSS.cpp: In function ‘int main()’:
GSS.cpp:8:14: error: the value of ‘n’ is not usable in a constant expression
8 | array<int, n> prices;
| ^
GSS.cpp:5:6: note: ‘int n’ is not const
5 | int n;
| ^
GSS.cpp:8:14: note: in template argument for type ‘long unsigned int’
8 | array<int, n> prices;
| ^
GSS.cpp:11:18: error: invalid types ‘int[int]’ for array subscript
11 | cin >> prices[i];
| ^
GSS.cpp:13:14: error: request for member ‘front’ in ‘prices’, which is of non-class type ‘int’
13 | sort(prices.front(), prices.front()+n);
| ^~~~~
GSS.cpp:13:30: error: request for member ‘front’ in ‘prices’, which is of non-class type ‘int’
13 | sort(prices.front(), prices.front()+n);
| ^~~~~
GSS.cpp:19:18: error: invalid types ‘int[int]’ for array subscript
19 | sum