| Problem | pandasoldiers |
|---|---|
| User | AshwinJoy |
| Submission Time | 2026-08-23 13:40:28 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
pandasoldiers.cpp:13:5: error: ‘int index’ redeclared as different kind of entity
13 | int index = 0;
| ^~~~~
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 pandasoldiers.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
| ^~~~~
pandasoldiers.cpp: In function ‘char getChar()’:
pandasoldiers.cpp:18:17: error: reference to ‘size’ is ambiguous
18 | if(index >= size){
| ^~~~
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/