Problem card
User Henries
Submission Time 2024-06-26 08:32:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp: In function ‘int main()’:
card.cpp:16:17: error: no match for ‘operator[]’ (operand types are ‘std::queue<int>’ and ‘int’)
16 | int save = qu[0];
| ^
card.cpp:21:17: error: no match for ‘operator[]’ (operand types are ‘std::queue<int>’ and ‘int’)
21 | int save = qu[1];
| ^
card.cpp:26:15: error: no match for ‘operator[]’ (operand types are ‘std::queue<int>’ and ‘int’)
26 | q.push(qu[i]);
| ^
card.cpp:31:2: error: ‘q’ was not declared in this scope; did you mean ‘qu’?
31 | q.push(save);
| ^
| qu
card.cpp:31:9: error: ‘save’ was not declared in this scope
31 | q.push(save);
| ^~~~
card.cpp:33:12: error: no match for ‘operator[]’ (operand types are ‘std::queue<int>’ and ‘int’)
33 | cout << qu[k-1]<<' '<<qu[k]<<' '<<qu[k+1];
| ^