Problem | descsort |
---|---|
User | gordonlu |
Submission Time | 2023-11-06 18:19:16 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
descsort.cpp: In function ‘int main()’:
descsort.cpp:9:2: error: ‘vector’ was not declared in this scope
9 | vector<int> array(n);
| ^~~~~~
descsort.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 |
descsort.cpp:9:9: error: expected primary-expression before ‘int’
9 | vector<int> array(n);
| ^~~
descsort.cpp:11:10: error: ‘array’ was not declared in this scope
11 | cin >> array[i];
| ^~~~~
descsort.cpp:2:1: note: ‘std::array’ is defined in header ‘<array>’; did you forget to ‘#include <array>’?
1 | #include <iostream>
+++ |+#include <array>
2 |
descsort.cpp:14:7: error: ‘array’ was not declared in this scope
14 | sort(array.begin(), array.end(), [](int a, int b) {
| ^~~~~