Borderou de evaluare (job #727015)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Cmmdc (clasa a 6-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 21 iul. 2023 10:13:16 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:7:28: error: 'long long int fdiv [99999999]' redeclared as different kind of entity
7 | long long int fdiv[99999999];
| ^
In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/cmath:45,
from main.cpp:3:
/usr/include/bits/mathcalls-narrow.h:27:20: note: previous declaration 'float fdiv(double, double)'
27 | __MATHCALL_NARROW (__MATHCALL_NAME (div), __MATHCALL_REDIR_NAME (div), 2);
| ^~~~~~~~~~~~~~~
main.cpp: In function 'int main()':
main.cpp:20:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
20 | fdiv[j]++;
| ^
main.cpp:20:23: warning: ISO C++ forbids incrementing a pointer of type 'float (*)(double, double) noexcept' {aka 'float (*)(double, double)'} [-Wpointer-arith]
20 | fdiv[j]++;
| ~~~~~~^
main.cpp:20:23: error: lvalue required as increment operand
20 | fdiv[j]++;
| ^
main.cpp:24:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
24 | fdiv[j]++;
| ^
main.cpp:24:23: warning: ISO C++ forbids incrementing a pointer of type 'float (*)(double, double) noexcept' {aka 'float (*)(double, double)'} [-Wpointer-arith]
24 | fdiv[j]++;
| ~~~~~~^
main.cpp:24:23: error: lvalue required as increment operand
24 | fdiv[j]++;
| ^
main.cpp:25:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
25 | fdiv[v[i]/j]++;
| ^
main.cpp:25:28: warning: ISO C++ forbids incrementing a pointer of type 'float (*)(double, double) noexcept' {aka 'float (*)(double, double)'} [-Wpointer-arith]
25 | fdiv[v[i]/j]++;
| ~~~~~~~~~~~^
main.cpp:25:28: error: lvalue required as increment operand
25 | fdiv[v[i]/j]++;
| ^
main.cpp:32:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
32 | if(fdiv[i]==n && c==1)
| ^
main.cpp:32:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
32 | if(fdiv[i]==n && c==1)
| ~~~~~~~^~~
main.cpp:37:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
37 | if(fdiv[i]==n-1 && c==2)
| ^
main.cpp:37:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
37 | if(fdiv[i]==n-1 && c==2)
| ~~~~~~~^~~~~
main.cpp:42:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
42 | if(fdiv[i]==n-2 && c==3)