/in/foo.cc:12:5: error: 'int index' redeclared as different kind of symbol
int index;
^~~~~
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 'int main()':
/in/foo.cc:29:22: error: overloaded function with no contextual type information
index = c[i].ma;
^~
/in/foo.cc:30:26: error: invalid types 'node [60051][<unresolved overloaded function type>]' for array subscript
(c[i].mi==a[index].ma)?arr[++l]=index:arr[--r]=index;
^
/in/foo.cc:30:41: error: cannot resolve overloaded function 'index' based on conversion to type 'int'
(c[i].mi==a[index].ma)?arr[++l]=index:arr[--r]=index;
^~~~~
/in/foo.cc:30:56: error: cannot resolve overloaded function 'index' based on conversion to type 'int'
(c[i].mi==a[index].ma)?arr[++l]=index:arr[--r]=index;
^~~~~