Problem ballot
User blob
Submission Time 2023-11-14 09:40:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ballot.cpp: In function ‘int main()’:
ballot.cpp:9:6: error: conflicting declaration ‘int arr [c]’
9 | int arr[c];// number that ronald chooses
| ^~~
ballot.cpp:8:6: note: previous declaration as ‘int arr [n]’
8 | int arr[n]; // number that student chooses
| ^~~
ballot.cpp:12:23: error: cannot convert ‘std::set<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’} to ‘int’ in initialization
12 | for (int it = s.begin(); it != s.end(); it++){
| ~~~~~~~^~
| |
| std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}
ballot.cpp:12:30: error: no match for ‘operator!=’ (operand types are ‘int’ and ‘std::set<int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<int>’})
12 | for (int it = s.begin(); it != s.end(); it++){
| ~~ ^~ ~~~~~~~
|