I had obtained this error while overloading the >> operator, and I have no idea why.
istream& operator>>(istream& stream, unsigned int in)
{
stream >> in;
//manyoperators
if(in>10)
in = -1;
return stream;
}
Part of code with error:
unsigned int tmm;
cin >> tmm;
Why? I have no other overloading of >>.
What it may be?
You can overload functions(in your case operator
>>) for only custom classes not inbuilt data types.The C++ standard library itself provides overloads for inbuilt data types.