Answer the question
In order to leave comments, you need to log in
How to redefine the & operator?
Good evening.
I have a SearchVector class. The job is to redefine the & operator.
So the code below would work
int n=3;
bool b3 = (n & v);
n=23;
bool b23 = (n & v);
n=5;
bool b5 = (n & v);
bool operator&( const T & rhs , const SearchVektor<T> & s)
{
//TODO
return true;
}
Answer the question
In order to leave comments, you need to log in
template<typename T>
bool operator&( const T & rhs , const SearchVektor<T> & s)
{
//TODO
return true;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question