prog.cpp: In function ‘int main()’:
prog.cpp:6:13: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<<’
cout<<a^b<<endl;
^
prog.cpp:7:9: error: no match for ‘operator|’ (operand types are ‘std::basic_ostream<char>’ and ‘int’)
cout<<a|b;
^
prog.cpp:7:9: note: candidates are:
In file included from /usr/include/c++/4.8/ios:42:0,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.8/bits/ios_base.h:79:3: note: std::_Ios_Fmtflags std::operator|(std::_Ios_Fmtflags, std::_Ios_Fmtflags)
operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
^
/usr/include/c++/4.8/bits/ios_base.h:79:3: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘std::_Ios_Fmtflags’
/usr/include/c++/4.8/bits/ios_base.h:119:3: note: std::_Ios_Openmode std::operator|(std::_Ios_Openmode, std::_Ios_Openmode)
operator|(_Ios_Openmode __a, _Ios_Openmode __b)
^
/usr/include/c++/4.8/bits/ios_base.h:119:3: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘std::_Ios_Openmode’
/usr/include/c++/4.8/bits/ios_base.h:157:3: note: std::_Ios_Iostate std::operator|(std::_Ios_Iostate, std::_Ios_Iostate)
operator|(_Ios_Iostate __a, _Ios_Iostate __b)
^
/usr/include/c++/4.8/bits/ios_base.h:157:3: note: no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘std::_Ios_Iostate’