Hi I was wondering how I could tackle this problem,
I need to overload +, – and * operators but need to replace them with Logical operators for example;
“+” should use OR
0+0 = 0 , 0+1 = 1, 1+1 = 1 ,1+0 = 1
would i have to place in the overload some sort of if statment?
Any help on how i could do this?
Thanks
They will being using binary as the data type, two matrices with binary as their data
There’s no need for an
ifstatement, you just need to return the result of&&and||.Note that you can’t overload operators for built-in types. At least one of the arguments must be user-defined.