how can i perform bitwise and operation on two binary numbers?
Ex: A-->1101
B-->1011
Then A AND B-->1001

I tried like this but getting compilation error saying that error: request for member 'operator&' in 'bin_celVal', which is of non-class type 'int'

what changes i have to do here?
Qt Code:
  1. int bin_celVal=BinVal(PrCell);
  2. int bin_Val=BinVal(Val);
  3. int ANDresult= bin_celVal.operator &(bin_Val);
  4. cout<<"RESULT:"<<ANDresult<<endl;
To copy to clipboard, switch view to plain text mode