foo.cc: In function ‘int main()’:
foo.cc:9:21: error: invalid declarator before ‘spots’
9 | int vector<int> spots(n);
| ^~~~~
foo.cc:11:14: error: ‘spots’ was not declared in this scope
11 | cin>>spots[i];
| ^~~~~
foo.cc:13:14: error: ‘spots’ was not declared in this scope
13 | int sort(spots.begin(), spots.end());
| ^~~~~
foo.cc:13:40: error: expression list treated as compound expression in initializer [-fpermissive]
13 | int sort(spots.begin(), spots.end());
| ^
foo.cc:13:9: warning: unused variable ‘sort’ [-Wunused-variable]
13 | int sort(spots.begin(), spots.end());
| ^~~~