Borderou de evaluare (job #1402699)

Utilizator smaraldaSmaranda Dinu smaralda Data 26 martie 2015 18:52:41
Problema Adapost Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:13:1: error: expected ‘,’ or ‘;’ before ‘pair’ pair <double, double> soldat[NMAX], adapost[NMAX]; ^ user.cpp: In function ‘int main()’: user.cpp:82:9: error: ‘soldat’ was not declared in this scope soldat[i] = read(); ^ user.cpp:84:9: error: ‘adapost’ was not declared in this scope adapost[i] = read(); ^ user.cpp:88:35: error: ‘soldat’ was not declared in this scope dist[i][j] = sqrt(sqr(soldat[i].x - adapost[j].x) + sqr(soldat[i].y - adapost[j].y)); ^ user.cpp:88:49: error: ‘adapost’ was not declared in this scope dist[i][j] = sqrt(sqr(soldat[i].x - adapost[j].x) + sqr(soldat[i].y - adapost[j].y)); ^ user.cpp: In function ‘std::pair<double, double> read()’: user.cpp:20:28: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lf%lf", &x, &y); ^ user.cpp: In function ‘int main()’: user.cpp:76:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("adapost.in", "r", stdin); ^ user.cpp:77:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("adapost.out", "w", stdout); ^ user.cpp:80:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ^

Ceva nu functioneaza?