Borderou de evaluare (job #1929557)
Utilizator | Data | 17 martie 2017 19:45:13 | |
---|---|---|---|
Problema | Suma divizorilor | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:7:37: error: ‘int index’ redeclared as different kind of symbol
int A, B, divisor[512], power[512], index = -1, S = 1, numerator, denominator;
^
In file included from /usr/include/c++/4.8/cstring:42:0,
from user.cpp:2:
/usr/include/string.h:482:1: error: previous declaration of ‘const char* index(const char*, int)’
index (__const char *__s, int __c) __THROW
^
user.cpp: In function ‘int main()’:
user.cpp:33:23: error: no pre-increment operator for type
divisor[++index] = prime[p];
^
user.cpp:34:24: error: invalid types ‘int [512][<unresolved overloaded function type>]’ for array subscript
power[index] = 1;
^
user.cpp:38:28: error: invalid types ‘int [512][<unresolved overloaded function type>]’ for array subscript
power[index]++;
^
user.cpp:44:19: error: no pre-increment operator for type
divisor[++index] = A;
^
user.cpp:45:20: error: invalid types ‘int [512][<unresolved overloaded function type>]’ for array subscript
power[index] = 1;
^
user.cpp:47:25: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<=’
for(int i = 0; i <= index; i++){
^
user.cpp:50:25: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<=’
for(int i = 0; i <= index; i++){
^
user.cpp:26:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("sumdiv.in", "r", stdin);
^
user.cpp:27:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("sumdiv.out", "w", stdout);
^
user.cpp:29:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &A, &B);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !