Borderou de evaluare (job #1858218)

Utilizator alittlezzCazaciuc Valentin alittlezz Data 27 ianuarie 2017 10:31:24
Problema Stramosi Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void dfs(int&, int&)’: user.cpp:22:23: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’ dfs(it, depth + 1); ^ user.cpp:16:6: error: in passing argument 2 of ‘void dfs(int&, int&)’ void dfs(int &node, int &depth){ ^ user.cpp: In function ‘int main()’: user.cpp:43:13: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’ dfs(0, 0); ^ user.cpp:16:6: error: in passing argument 1 of ‘void dfs(int&, int&)’ void dfs(int &node, int &depth){ ^ user.cpp:28:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("stramosi.in", "r", stdin); ^ user.cpp:29:41: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("stramosi.out", "w", stdout); ^ user.cpp:31:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &n, &q); ^ user.cpp:33:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &x); ^ user.cpp:37:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d", &x, &y); ^

Ceva nu functioneaza?