Problem card
User Qxhb3
Submission Time 2025-02-20 19:52:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp: In function ‘void shuffle()’:
card.cpp:12:30: error: no match for ‘operator[]’ (operand types are ‘std::queue<long long int>’ and ‘int’)
12 | for (int b = 0; b<n; b++) a[b] = b;
| ^
card.cpp:15:28: error: no matching function for call to ‘getline(std::istream&, std::string&, const char [2])’
15 | getline(cin, moves, ".");
| ^
In file included from /usr/include/stdio.h:864,
from /usr/include/c++/9/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
from card.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio.h:118:1: note: candidate: ‘__ssize_t getline(char**, size_t*, FILE*)’
118 | getline (char **__lineptr, size_t *__n, FILE *__stream)
| ^~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdio.h:118:17: note: no known conversion for argument 1 from ‘std::istream’ {aka ‘std::basic