int operator &( BMap24b a, BMap24b b );
bool operator &( BMap24b a, BMap24b b );
There is no way for the compiler to differentiate between the parameters of the two prototypes listed above. Therefore you have to do it somehow in your code. Then when you have determined how to tell when to return an int and when to return a bool you can make that happen, in a sense anyway.
If you want to be able to return one of two different types I would use a struct as a return type. The struct to have both possibities as data members.
I suppose you could try using a union insetead of a struct, but I haven't used that construct at all in code that I've written.
Answer operator &( BMap24b a, BMap24b b );
Answer operator &( BMap24b a, BMap24b b )
//determine whether you are going to initialize counter or flag
//do the manipulation
//change the value of counter or flag
Also: I have a problem with the following code:
you are using the & operator with types for which you are trying to define the & operator. That seems illogical to me.
bool BMap24b:: operator&( BMap24b a, BMap24b b )
i = a & b;