Borderou de evaluare (job #1220600)

Utilizator thewildnathNathan Wildenberg thewildnath Data 17 august 2014 20:22:47
Problema Rege Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:8:15: error: ‘int y1’ redeclared as different kind of symbol int n, m, x1, y1, x2, y2, t, maxi; ^ In file included from /usr/include/features.h:357:0, from /usr/include/stdio.h:28, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’ __MATHCALL (y1,, (_Mdouble_)); ^ user.cpp: In function ‘int main()’: user.cpp:37:53: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘double (*)(double)throw ()’ [-Wformat=] scanf("%d%d%d%d%d%d", &n, &m, &y1, &x1, &y2, &x2); ^ user.cpp:39:9: error: invalid types ‘int [1002][1002][double(double)throw ()]’ for array subscript v[y1][x1]=1; ^ user.cpp:41:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] maxi=max(abs(x1-x2), abs(y1-y2)); ^ user.cpp:41:35: error: call of overloaded ‘abs(double (*)(double)throw ())’ is ambiguous maxi=max(abs(x1-x2), abs(y1-y2)); ^ user.cpp:41:35: note: candidates are: In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/bits/stl_algo.h:59, from /usr/include/c++/4.8/algorithm:62, from user.cpp:2: /usr/include/stdlib.h:771:12: note: int abs(int) <near match> extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ /usr/include/stdlib.h:771:12: note: no known conversion for argument 1 from ‘double (*)(double)throw ()’ to ‘int’ In file included from /usr/include/c++/4.8/bits/stl_algo.h:59:0, from /usr/include/c++/4.8/algorithm:62, from user.cpp:2: /usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int) <near match> abs(long long __x) { return __builtin_llabs (__x); } ^ /usr/include/c++/4.8/cstdlib:174:3: note: no known conversion for argument 1 from ‘double (*)(double)throw ()’ to ‘long long int’ /usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int) <near match> abs(long __i) { return __builtin_labs(__i); } ^ /usr/include/c++/4.8/cstdlib:166:3: note: no known conversion for argument 1 from ‘double (*)(double)throw ()’ to ‘long int’ user.cpp:48:21: warning: pointer to a function used in arithmetic [-Wpointer-arith] calc(y1-l, i); ^ user.cpp:48:20: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘int’ [-fpermissive] calc(y1-l, i); ^ user.cpp:14:6: error: initializing argument 1 of ‘void calc(int, int)’ [-fpermissive] void calc(int y, int x)

Ceva nu functioneaza?