foo.cc: In function 'int main()':
foo.cc:7:9: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>' and 'int')
7 | cout<<a^2;
| ~~~~~~~^~
| | |
| | int
| std::basic_ostream<char>
foo.cc:7:9: note: candidate: 'operator^(int, int)' <built-in>
7 | cout<<a^2;
| ~~~~~~~^~
foo.cc:7:9: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/ios_base.h:91:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator^(std::_Ios_Fmtflags, std::_Ios_Fmtflags)'
91 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
| ^~~~~~~~
/usr/include/c++/9/bits/ios_base.h:91:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
91 | operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/ios_base.h:133:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator^(std::_Ios_Openmode, std::_Ios_Openmode)'
133 | operator^(_Ios_Openmode __a, _Ios_Openmode __b)
| ^~~~~~~~
/usr/include/c++/9/bits/ios_base.h:133:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
133 | operator^(_Ios_Openmode __a, _Ios_Openmode __b)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/ios_base.h:173:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator^(std::_Ios_Iostate, std::_Ios_Iostate)'
173 | operator^(_Ios_Iostate __a, _Ios_Iostate __b)
| ^~~~~~~~
/usr/include/c++/9/bits/ios_base.h:173:26: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
173 | operator^(_Ios_Iostate __a, _Ios_Iostate __b)
| ~~~~~~~~~~~~~^~~
[Hydro](https://hydro.ac)提供评测服务