Compile Error

/in/foo.cc:17:13: error: 'int index' redeclared as different kind of symbol
 int head[N],index;
             ^~~~~
In file included from /usr/include/c++/7/cstring:42:0,
                 from /in/foo.cc:3:
/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:37:11: error: no pre-increment operator for type
    head[++index] = x - d - 1;
           ^~~~~
/in/foo.cc:38:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].l = x - d - 1;
             ^
/in/foo.cc:39:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].r = x + d;
             ^
/in/foo.cc:40:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].h = y - d - 1;
             ^
/in/foo.cc:41:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].d = flag;
             ^
/in/foo.cc:42:11: error: no pre-increment operator for type
    head[++index] = x + d;
           ^~~~~
/in/foo.cc:43:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].l = x - d - 1;
             ^
/in/foo.cc:44:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].r = x + d;
             ^
/in/foo.cc:45:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].h = y + d;
             ^
/in/foo.cc:46:13: error: invalid types 'segment [10000][<unresolved overloaded function type>]' for array subscript
    seg[index].d = flag * -1;
             ^
/in/foo.cc:48:22: error: invalid operands of types 'int [10000]' and '<unresolved overloaded function type>' to binary 'operator+'
   sort(head + 1,head + index + 1);
                 ~~~~~^~~~~~~
/in/foo.cc:49:20: error: invalid operands of types 'segment [10000]' and '<unresolved overloaded function type>' to binary 'operator+'
   sort(seg + 1,seg + index + 1);
                ~~~~^~~~~~~
/in/foo.cc:50:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   for(int i = 1;i < index;i++){
                 ~~^~~~~~~
/in/foo.cc:56:20: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
    for(int j = 1;j < index;j++){
                  ~~^~~~~~~

信息

递交者
类型
递交
题目
Dominance
语言
C++
递交时间
2017-09-18 20:12:22
评测时间
2017-09-18 20:12:22
评测机
分数
0
总耗时
391ms
峰值内存
36.434 MiB