Borderou de evaluare (job #1915995)

Utilizator zdavid112zIon David-Gabriel zdavid112z Data 8 martie 2017 23:33:46
Problema Potrivirea sirurilor Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:2:61: error: ‘fstream’ was not declared in this scope int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^ user.cpp:2:61: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from user.cpp:1: /usr/include/c++/4.8/iosfwd:163:33: note: ‘std::fstream’ typedef basic_fstream<char> fstream; ^ user.cpp:2:69: error: expected ‘;’ before ‘f’ int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^ user.cpp:2:103: error: ‘f’ was not declared in this scope int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^ user.cpp:2:131: warning: suggest parentheses around assignment used as truth value [-Wparentheses] int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^ user.cpp:2:144: error: ‘g’ was not declared in this scope int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^ user.cpp:2:162: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses] int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^ user.cpp:2:57: warning: label ‘std’ defined but not used [-Wunused-label] int x,p,s[1<<22];std::string a,b="strmatch.";int main(){std:fstream f(b+"in",_S_in),g(b+"out",_S_out);f>>a>>b;while(p=b.find(a,p)+1)s[x++]=p-1;g<<x<<'\n';while(p<x&p<1000)g<<s[p++]<<' ';} ^

Ceva nu functioneaza?