Without knowing what you are doing and why I suppose you can Mark that function with override but I can’t comment on if that is wise without more explanation.
If you’re trying to override the methods created by the CC_SYNTHESIZE macro, then you’ll either need to declare them as you normally would, or create your own macro that has the override specifier.
So, either something like this (IMHO it’s the best way, since it’s clearer):
int getIdObject() const override { // your implementation }
void setIdObject(int var) override { // your implementation }