Borderou de evaluare (job #3178347)

Utilizator strimbumarkMark Strimbu strimbumark Data 1 decembrie 2023 16:50:05
Problema Potrivirea sirurilor Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:19:4: error: reference to 'cout' is ambiguous 19 | cout<<tot<<"\n" ; | ^~~~ In file included from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:75, from main.cpp:1: /usr/include/c++/12.2.1/iostream:61:18: note: candidates are: 'std::ostream std::cout' 61 | extern ostream cout; /// Linked to standard output | ^~~~ main.cpp:6:10: note: 'std::ofstream cout' 6 | ofstream cout("strmatch.out"); | ^~~~ main.cpp:34:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 34 | if(pi[i] == t.size() && i>t.size()) | ~~~~~~^~~~~~~~~~~ main.cpp:34:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 34 | if(pi[i] == t.size() && i>t.size()) | ~^~~~~~~~~ main.cpp:37:4: error: reference to 'cout' is ambiguous 37 | cout<<a.size()<<"\n"; | ^~~~ /usr/include/c++/12.2.1/iostream:61:18: note: candidates are: 'std::ostream std::cout' 61 | extern ostream cout; /// Linked to standard output | ^~~~ main.cpp:6:10: note: 'std::ofstream cout' 6 | ofstream cout("strmatch.out"); | ^~~~ main.cpp:38:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 38 | for(int i=0;i<a.size();i++) | ~^~~~~~~~~ main.cpp:39:9: error: reference to 'cout' is ambiguous 39 | cout<<a[i]<<" "; | ^~~~ /usr/include/c++/12.2.1/iostream:61:18: note: candidates are: 'std::ostream std::cout' 61 | extern ostream cout; /// Linked to standard output | ^~~~ main.cpp:6:10: note: 'std::ofstream cout' 6 | ofstream cout("strmatch.out"); | ^~~~ Non zero exit status: 1

Ceva nu functioneaza?