Problem card
User Hoang
Submission Time 2023-02-14 21:42:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

card.cpp:6:5: error: ‘int index’ redeclared as different kind of entity
6 | int index = 2;
| ^~~~~
In file included from /usr/include/string.h:432,
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/strings.h:61:1: note: previous declaration ‘const char* index(const char*, int)’
61 | index (const char *__s, int __c) __THROW
| ^~~~~
card.cpp: In function ‘int trace_number(int, int)’:
card.cpp:10:18: error: cannot resolve overloaded function ‘index’ based on conversion to type ‘int’
10 | for (int i = index; i > 0; i--)
| ^~~~~
card.cpp: In function ‘int main()’:
card.cpp:44:24: error: invalid types ‘char [100001][<unresolved overloaded function type>]’ for array subscript
44 | while (choice[index] != '.')
| ^
card.c