&& operator overloading

Hi,
I want to know how do I overload && operator. Please help me I have an exam coming up soon. I need the coding && overloaded operator(defination; outside the class in c++)
outside what class?

what should the new && do?

I mean the basic format is
bool classname:: operator && (classname &L, classname &R)
{
if (compare something)
return true;
return false;
}
I need the coding && overloaded operator(defination; outside the class in c++)

The same way you would code any overloaded binary operator, but you should keep in mind that an overloaded && operator will not perform short-circuiting.
Topic archived. No new replies allowed.