Borderou de evaluare (job #1915997)

Utilizator zdavid112zIon David-Gabriel zdavid112z Data 8 martie 2017 23:34:17
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:79: error: ‘_S_in’ 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:79: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:42: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/bits/ios_base.h:108:7: note: ‘_S_in’ _S_in = 1L << 3, ^ user.cpp:2:96: error: ‘_S_out’ 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:96: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:42: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/bits/ios_base.h:109:7: note: ‘_S_out’ _S_out = 1L << 4, ^ user.cpp:2:132: 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:163: 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++]<<' ';} ^

Ceva nu functioneaza?