Problem card
User AwkUngenially
Submission Time 2025-04-05 11:39:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp: In function ‘int main()’:
card.cpp:9:32: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]
9 | char * split_letters = strtok(letters, "");
| ^~~~~~~
| |
| char
In file included from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from card.cpp:1:
/usr/include/string.h:336:39: note: initializing argument 1 of ‘char* strtok(char*, const char*)’
336 | extern char *strtok (char *__restrict __s, const char *__restrict __delim)
| ~~~~~~~~~~~~~~~~~^~~
card.cpp:16:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if (split_letters[i] == "A") {
| ^~~