Borderou de evaluare (job #1764215)

Utilizator andrei_diaconu11Andrei C. Diaconu andrei_diaconu11 Data 25 septembrie 2016 11:16:38
Problema Patrate 3 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:10: error: expected unqualified-id before ‘int’ int x, int y; ^ user.cpp: In function ‘int search(punct)’: user.cpp:11:9: error: ‘liste’ was not declared in this scope for(j=liste[(p.x+p.y)%MOD];j!=0 && !(v[h[j]].x==p.x && v[h[j]].y==p.y);j=nxt[j]); ^ user.cpp:11:22: error: ‘struct punct’ has no member named ‘y’ for(j=liste[(p.x+p.y)%MOD];j!=0 && !(v[h[j]].x==p.x && v[h[j]].y==p.y);j=nxt[j]); ^ user.cpp:11:25: error: ‘MOD’ was not declared in this scope for(j=liste[(p.x+p.y)%MOD];j!=0 && !(v[h[j]].x==p.x && v[h[j]].y==p.y);j=nxt[j]); ^ user.cpp:11:42: error: ‘h’ was not declared in this scope for(j=liste[(p.x+p.y)%MOD];j!=0 && !(v[h[j]].x==p.x && v[h[j]].y==p.y);j=nxt[j]); ^ user.cpp:11:71: error: ‘struct punct’ has no member named ‘y’ for(j=liste[(p.x+p.y)%MOD];j!=0 && !(v[h[j]].x==p.x && v[h[j]].y==p.y);j=nxt[j]); ^ user.cpp:11:76: error: ‘nxt’ was not declared in this scope for(j=liste[(p.x+p.y)%MOD];j!=0 && !(v[h[j]].x==p.x && v[h[j]].y==p.y);j=nxt[j]); ^ user.cpp: In function ‘void add(int)’: user.cpp:16:3: error: ‘h’ was not declared in this scope h[a] ^ user.cpp:16:5: error: ‘a’ was not declared in this scope h[a] ^ user.cpp:17:1: error: expected ‘;’ before ‘}’ token } ^ user.cpp: In function ‘int main()’: user.cpp:22:21: error: ‘n’ was not declared in this scope fscanf(fi, "%d", &n); ^ user.cpp:23:7: error: ‘i’ was not declared in this scope for(i=0;i<n;i++){ ^ user.cpp:24:20: warning: format ‘%d’ expects a matching ‘int*’ argument [-Wformat=] fscanf(fi, "%d") ^ user.cpp:25:3: error: expected ‘;’ before ‘}’ token } ^ user.cpp:21:40: warning: unused variable ‘fo’ [-Wunused-variable] FILE *fi=fopen("patrate3.in", "r"), *fo=fopen("patrate3.out", "w"); ^ user.cpp:25:3: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] }

Ceva nu functioneaza?