I have a class Set and it’s inherited by classes that represents subsets of natural numbers.
I want to overload operator && global(outside a class).
Since I don’t know the exact type of arguments,
I want to use pointers to the base class.
the error: nonmember operator requires a parameter with class or enum type
Intersect operator&&(Set* A, Set* B){
Intersect result(A, B);
return result;
}
Any idea how to fix that?