/in/foo.cc:3:34: error: 'int index [103]' redeclared as different kind of symbol
int head[103],cnt,n,m,q,index[103],s,c,d,dist,ans;
^
In file included from /usr/include/c++/6/cstring:42:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:48,
from /in/foo.cc:1:
/usr/include/string.h:477:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^~~~~
/in/foo.cc: In function 'void bfs()':
/in/foo.cc:25:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
if(index[s]>c&&ans)
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:41:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
scanf("%d",index+i);
~~~~~^~