Borderou de evaluare (job #1623309)
Utilizator | Data | 1 martie 2016 18:44:09 | |
---|---|---|---|
Problema | Alpin | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:7:10: error: ‘int rand []’ redeclared as different kind of symbol
int rand[] = {-1, 0 , 0 , 1};
^
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/ext/string_conversions.h:41,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/stdlib.h:380:12: error: previous declaration of ‘int rand()’
extern int rand (void) __THROW;
^
user.cpp: In function ‘int f(int, int)’:
user.cpp:17:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (h[a + rand[i]][b + col[i]] < h[a][b] && f(rand[i] + a, col[i] + b) > best[a][b])
^
user.cpp:17:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
user.cpp:17:26: error: invalid types ‘int [1025][1025][int (*)()throw ()]’ for array subscript
if (h[a + rand[i]][b + col[i]] < h[a][b] && f(rand[i] + a, col[i] + b) > best[a][b])
^
user.cpp:17:61: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (h[a + rand[i]][b + col[i]] < h[a][b] && f(rand[i] + a, col[i] + b) > best[a][b])
^
user.cpp:17:65: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (h[a + rand[i]][b + col[i]] < h[a][b] && f(rand[i] + a, col[i] + b) > best[a][b])
^
user.cpp:17:63: error: invalid conversion from ‘int (*)()throw ()’ to ‘int’ [-fpermissive]
if (h[a + rand[i]][b + col[i]] < h[a][b] && f(rand[i] + a, col[i] + b) > best[a][b])
^
user.cpp:10:5: error: initializing argument 1 of ‘int f(int, int)’ [-fpermissive]
int f(int a, int b)
^
user.cpp:18:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
best[a][b] = f(rand[i] + a, col[i] + b);
^
user.cpp:18:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
best[a][b] = f(rand[i] + a, col[i] + b);
^
user.cpp:18:36: error: invalid conversion from ‘int (*)()throw ()’ to ‘int’ [-fpermissive]
best[a][b] = f(rand[i] + a, col[i] + b);
^
user.cpp:10:5: error: initializing argument 1 of ‘int f(int, int)’ [-fpermissive]
int f(int a, int b)
^
user.cpp: In function ‘void restore(int, int)’:
user.cpp:34:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !