It's hard to know for sure, because you've decided to withhold the line number of the line that's generating the error, and also to withhold the rest of your code.
But since you obviously want us to play some bizarre guessing game, my guess is that the statements this->getName()==getName and this->getId()==getId()
(a) violate the constness of your operator==, and
(b) make no sense whatsoever, because this->getName() is the same as getName().
why getName() and gerId() has to const for this overloading to work?
Because that's the whole point of a const method - that you can't modify the state of the object within the method. And to enforce this, you are restricted to only calling const methods.
EDIT: The point is that the compiler doesn't necessarily know that those methods you're calling don't change the object. The only way to be sure is to disallow all calls to non-const methods.
But, again, this is all based on guesses, because you're still refusing to show us your code.
Oh, I got it now. I'm using get_something() function in order to read private fields in "Check" class. If those method are not private, then the private fields will be change- breaking the encapsulation principle.