Borderou de evaluare (job #833418)

Utilizator avatar marinus Nerdvana 6 Marin Andrei marinus IP ascuns
Problemă Fotbal3 (clasa a 6-a) Compilator cpp
Rundă pg-marin Status evaluat
Dată 5 sept. 2025 15:19:26 Scor 0

Raport evaluator

Eroare de compilare: main.cpp:3:13: error: variable 'std::ifstream cin' has initializer but incomplete type 3 | ifstream cin("fotbal3.in"); | ^ main.cpp:2:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>' 1 | #include <iostream> +++ |+#include <fstream> 2 | using namespace std; main.cpp:4:14: error: variable 'std::ofstream cout' has initializer but incomplete type 4 | ofstream cout("fotbal3.out"); | ^ main.cpp:4:14: note: 'std::ofstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>' main.cpp: In function 'int main()': main.cpp:13:9: error: reference to 'cin' is ambiguous 13 | cin>>z>>y; | ^~~ In file included from main.cpp:1: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/iostream:62:18: note: candidates are: 'std::istream std::cin' 62 | extern istream cin; ///< Linked to standard input | ^~~ main.cpp:3:10: note: '<typeprefixerror>cin' 3 | ifstream cin("fotbal3.in"); | ^~~ main.cpp:14:16: error: expected primary-expression before '=' token 14 | if(z === 'P') | ^ main.cpp:16:16: error: expected primary-expression before '=' token 16 | if(z === 'F') | ^ main.cpp:18:16: error: expected primary-expression before '=' token 18 | if(z === 'M') | ^ main.cpp:20:16: error: expected primary-expression before '=' token 20 | if(z === 'A') | ^ main.cpp:24:6: error: reference to 'cout' is ambiguous 24 | cout<<cnt1<<" "<<cnt2<<" "<<cnt3<<" "<<cnt4; | ^~~~ /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/iostream:63:18: note: candidates are: 'std::ostream std::cout' 63 | extern ostream cout; ///< Linked to standard output | ^~~~ main.cpp:4:10: note: '<typeprefixerror>cout' 4 | ofstream cout("fotbal3.out"); | ^~~~ main.cpp:7:11: warning: unused variable 'x' [-Wunused-variable] 7 | int cer, x, f, m, a, n, y, cnt1, cnt2, cnt3, cnt4; | ^ main.cpp:7:14: warning: unused variable 'f' [-Wunused-variable] 7 | int cer, x, f, m, a, n, y, cnt1, cnt2, cnt3, cnt4; | ^ main.cpp:7:17: warning: unused variable 'm' [-Wunused-variable]