I was confused by this piece of code I recently saw on stackoverflow. The return value must be IntArray& (so an address, right?). But then he returns *this (a value, right?). This seems not logic to me.. This question could be a duplicate but i didn't found it so very sorry if it is. Here is the code:
IntArray& IntArray::operator=(const IntArray& other){
if(this == &other){
return *this;
}
...
}