记录详情

Compile Error

/in/foo.cc:17:5: error: 'int time' redeclared as different kind of symbol
 int time;
     ^~~~
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:1:
/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 main()':
/in/foo.cc:53:37: warning: format '%d' expects argument of type 'int*', but argument 5 has type 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' [-Wformat=]
  scanf("%d%d%d%d",&n,&m,&start,&time);
                                     ^
/in/foo.cc:71:7: warning: pointer to a function used in arithmetic [-Wpointer-arith]
  out+=time;
       ^~~~
/in/foo.cc:71:7: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]

信息

递交者
类型
递交
题目
分糖果
语言
C++
递交时间
2019-03-26 13:56:51
评测时间
2019-03-26 13:56:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes