Borderou de evaluare (job #1932380)

Utilizator 1475369147896537415369Andrei Udriste 1475369147896537415369 Data 19 martie 2017 18:40:48
Problema Geometry Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:7:12: error: ‘int y0’ redeclared as different kind of symbol int N, x0, y0, x1, y1, intersections; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/cstdio:41, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:242:1: error: previous declaration of ‘double y0(double)’ __MATHCALL (y0,, (_Mdouble_)); ^ user.cpp:7:20: error: ‘int y1’ redeclared as different kind of symbol int N, x0, y0, x1, y1, intersections; ^ In file included from /usr/include/features.h:357:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:420, from /usr/include/c++/4.8/cstdio:41, 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:18:48: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘double (*)(double)throw ()’ [-Wformat=] scanf("%d %d %d %d", &x0, &y0, &x1, &y1); ^ user.cpp:18:48: warning: format ‘%d’ expects argument of type ‘int*’, but argument 5 has type ‘double (*)(double)throw ()’ [-Wformat=] user.cpp:20:39: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘int’ [-fpermissive] coord[i][0] = x0; coord[i][1] = y0; ^ user.cpp:23:52: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive] slope[i] = (x1 == x0) ? undefined : ((y1 - y0) / (x1 - x0)); ^ user.cpp:12:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("geometry.in", "r", stdin); ^ user.cpp:13:41: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("geometry.out", "w", stdout); ^ user.cpp:15:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ user.cpp:18:49: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d %d", &x0, &y0, &x1, &y1); ^

Ceva nu functioneaza?