foo.cc:10:1: error: 'vector' does not name a type; did you mean 'perror'?
vector<int> v;
^~~~~~
perror
foo.cc: In function 'int main()':
foo.cc:17:3: error: 'v' was not declared in this scope
v.push_back(x);
^
foo.cc:19:7: error: 'v' was not declared in this scope
sort(v.begin(), v.end());
^
foo.cc:22:17: error: unable to deduce 'auto&&' from 'v'
for ( auto i : v ) printf("%d ", i);
^
foo.cc:16:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x; scanf("%d", &x);
~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务