foo.cc: In function 'int main()':
foo.cc:15:13: warning: comparison of constant '10' with boolean expression is always true [-Wbool-compare]
else if(0<x<10)
~~~^~~
foo.cc:15:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
else if(0<x<10)
~^~
foo.cc:19:14: warning: comparison of constant '25' with boolean expression is always true [-Wbool-compare]
else if(10<x<25)
~~~~^~~
foo.cc:19:12: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
else if(10<x<25)
~~^~
foo.cc:21:10: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>' and 'int')
cout<<x^2;
~~~~~~~^~
foo.cc:21:10: note: candidate: operator^(int, int) <built-in>
foo.cc:21:10: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/c++/7/bits/ios_base.h:91:3: note: candidate: constexpr std::_Ios_Fmtflags std::operator^(std::_Ios_Fmtflags, std::_Ios_Fmtflags)
operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
^~~~~~~~
/usr/include/c++/7/bits/ios_base.h:91:3: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
/usr/include/c++/7/bits/ios_base.h:133:3: note: candidate: constexpr std::_Ios_Openmode std::operator^(std::_Ios_Openmode, std::_Ios_Openmode)
operator^(_Ios_Openmode __a, _Ios_Openmode __b)
^~~~~~~~
/usr/include/c++/7/bits/ios_base.h:133:3: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
/usr/include/c++/7/bits/ios_base.h:173:3: note: candidate: constexpr std::_Ios_Iostate std::operator^(std::_Ios_Iostate, std::_Ios_Iostate)
operator^(_Ios_Iostate __a, _Ios_Iostate __b)
^~~~~~~~
/usr/include/c++/7/bits/ios_base.h:173:3: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
[Hydro](https://hydro.ac)提供评测服务