记录详情

Compile Error

/in/foo.cc:20:5: error: 'int time' redeclared as different kind of symbol
 int time=0,low[maxn],num[maxn];
     ^~~~
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148,
                 from /usr/include/c++/6/ext/atomicity.h:35,
                 from /usr/include/c++/6/bits/ios_base.h:39,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/time.h:192:15: note: previous declaration 'time_t time(time_t*)'
 extern time_t time (time_t *__timer) __THROW;
               ^~~~
/in/foo.cc: In function 'int tarjan(int, int)':
/in/foo.cc:22:6: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' [-Wpointer-arith]
  time++;
      ^~
/in/foo.cc:22:6: error: lvalue required as increment operand
/in/foo.cc:23:20: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
  num[cur]=low[cur]=time;
                    ^~~~
/in/foo.cc:36:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
学校
题目数据
下载
语言
C++
递交时间
2017-09-02 14:50:37
评测时间
2017-09-02 14:50:37
评测机
分数
0
总耗时
252ms
峰值内存
34.742 MiB