Borderou de evaluare (job #1802793)
Utilizator | Stroe Cristii cristi_vadamue | Data | 10 noiembrie 2016 17:31:03 |
---|---|---|---|
Problema | Alpin | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int extend(int, int)’:
user.cpp:15:24: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
if(s[j]) return s[j];
^
user.cpp:18:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(a[i+dx[k]][j+dy[k]] > a[j] && a[i+dx[k]][j+dy[k]] >= 0)
^
user.cpp:21:10: error: incompatible types in assignment of ‘int’ to ‘int [1025]’
s[j] = _max;
^
user.cpp:22:15: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
return s[j];
^
user.cpp:16:22: warning: unused variable ‘val’ [-Wunused-variable]
int _max = 1, k, val;
^
user.cpp: In function ‘int main()’:
user.cpp:35:26: error: incompatible types in assignment of ‘int’ to ‘int [1025]’
= a[0] = a[n+1] = a[n+1] = BORDER;
^
user.cpp:37:26: error: incompatible types in assignment of ‘int’ to ‘int [1025]’
= s[0] = s[n+1] = s[n+1] = BORDER;
^
user.cpp:42:35: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘int (*)[1025]’ [-Wformat=]
fscanf(in, "%d", &a[j]);
^
user.cpp:57:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
[y] != 1) {
^
user.cpp:59:22: error: invalid types ‘int [1025][1025][int*]’ for array subscript
if(s[x+dx][y+dy] == s
^
user.cpp:62:11: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
x += dx;
^
user.cpp:63:11: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
y += dy;
^
user.cpp:29:22: warning: unused variable ‘val’ [-Wunused-variable]
int n, _max = 0, val, i, j, x, y;
^
user.cpp:31:25: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(in, "%d", &n);
^
user.cpp:42:36: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(in, "%d", &a[j]);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !