Problem singlefile
User PlayVoltz
Submission Time 2023-09-16 09:22:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

singlefile.cpp: In function ‘int main()’:
singlefile.cpp:5:2: error: ‘cin’ was not declared in this scope
5 | cin>>n;
| ^~~
singlefile.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | using namespace std;
singlefile.cpp:6:2: error: ‘vector’ was not declared in this scope
6 | vector <int> vect(n);
| ^~~~~~
singlefile.cpp:1:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
+++ |+#include <vector>
1 | using namespace std;
singlefile.cpp:6:10: error: expected primary-expression before ‘int’
6 | vector <int> vect(n);
| ^~~
singlefile.cpp:7:30: error: ‘vect’ was not declared in this scope
7 | for (int i=0; i<n; ++i)cin>>vect[i];
| ^~~~
singlefile.cpp:8:2