Borderou de evaluare (job #1866743)
Utilizator | Data | 3 februarie 2017 14:46:30 | |
---|---|---|---|
Problema | Prieteni | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:14: error: ‘int time [1001]’ redeclared as different kind of symbol
int time[MAXN];
^
In file included from /usr/include/pthread.h:26:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr-default.h:35,
from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr.h:148,
from /usr/include/c++/4.8/ext/atomicity.h:33,
from /usr/include/c++/4.8/bits/basic_string.h:39,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/random:41,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/time.h:186:15: error: previous declaration of ‘time_t time(time_t*)’
extern time_t time (time_t *__timer) __THROW;
^
user.cpp: In function ‘int main()’:
user.cpp:21:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
scanf("%d", &time[i]);
^
user.cpp:21:29: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=]
scanf("%d", &time[i]);
^
user.cpp:22:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(time[i] < t)
^
user.cpp:22:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(time[i] < t)
^
user.cpp:24:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
t = time[i];
^
user.cpp:24:23: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘int’ [-fpermissive]
user.cpp:31:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
printf("%d\n%d", time[1], time[1]);
^
user.cpp:31:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
printf("%d\n%d", time[1], time[1]);
^
user.cpp:31:42: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=]
printf("%d\n%d", time[1], time[1]);
^
user.cpp:31:42: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=]
user.cpp:38:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
printf("%d %d\n", time[idx], time[i]);
^
user.cpp:38:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
printf("%d %d\n", time[idx], time[i]);
^
user.cpp:38:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !