bosses.cpp:20:11: error: 'int index' redeclared as different kind of entity
20 | int n, k, index = 0;
| ^~~~~
In file included from /usr/include/string.h:432,
from /usr/include/c++/10/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:48,
from bosses.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
| ^~~~~
bosses.cpp: In function 'int calc(int)':
bosses.cpp:35:11: error: cannot resolve overloaded function 'index' based on conversion to type 'int'
35 | vst[v] = index;
| ^~~~~
bosses.cpp:40:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator!='
40 | if(vst[u] != index){
| ~~~~~~~^~~~~~~~
bosses.cpp:41:14: error: cannot resolve overloaded function 'index' based on conversion to type 'int'
41 | vst[u] = index;
| ^~~~~
bosses.cpp:47:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator!='
47 | if(vst[i] != index) return INF;
| ~~~~~~~^~~~~~~~
bosses.cpp: In function 'void inp()':
bosses.cpp:63:8: error: no post-increment operator for type
63 | index++;
| ^~
bosses.cpp: In function 'void run_with_file()':
bosses.cpp:28:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
28 | freopen(file".inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
bosses.cpp:29:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
29 | freopen(file".out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~