Problem sadtrainer
User thatlycheeoolongdrink
Submission Time 2025-02-19 17:22:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sadtrainer.cpp: In function ‘int main()’:
sadtrainer.cpp:6:2: error: ‘vector’ was not declared in this scope
6 | vector<int> x;
| ^~~~~~
sadtrainer.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
sadtrainer.cpp:6:9: error: expected primary-expression before ‘int’
6 | vector<int> x;
| ^~~
sadtrainer.cpp:11:3: error: ‘x’ was not declared in this scope
11 | x.push_back(v);
| ^
sadtrainer.cpp:13:7: error: ‘x’ was not declared in this scope
13 | sort(x.begin(),x.end(),greater<int>());
| ^
sadtrainer.cpp:13:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
13 | sort(x.begin(),x.end(),greater<int>());
| ^~~~
| qsort