Problem gotoschool
User Leeyee
Submission Time 2025-08-22 17:07:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gotoschool.cpp: In function ‘int main()’:
gotoschool.cpp:16:15: error: ‘class std::vector<student>’ has no member named ‘pos’
16 | cin >> v[i].pos;
| ^~~
gotoschool.cpp:17:8: error: ‘class std::vector<student>’ has no member named ‘regno’
17 | v[i].regno = i+1;
| ^~~~~
gotoschool.cpp:19:9: error: request for member ‘begin’ in ‘v’, which is of non-class type ‘std::vector<student> [a]’
19 | sort(v.begin(),v.end(),comparator);
| ^~~~~
gotoschool.cpp:19:19: error: request for member ‘end’ in ‘v’, which is of non-class type ‘std::vector<student> [a]’
19 | sort(v.begin(),v.end(),comparator);
| ^~~
gotoschool.cpp:21:14: error: ‘class std::vector<student>’ has no member named ‘regno’
21 | cout<<v[i].regno<<" ";
| ^~~~~