prog.cpp:1:23: error: ‘DatabaseObject’ does not name a type
bool operator==(const DatabaseObject &r) const
^
prog.cpp:1:39: error: ISO C++ forbids declaration of ‘r’ with no type [-fpermissive]
bool operator==(const DatabaseObject &r) const
^
prog.cpp:1:42: error: non-member function ‘bool operator==(const int&)’ cannot have cv-qualifier
bool operator==(const DatabaseObject &r) const
^
prog.cpp:1:42: error: ‘bool operator==(const int&)’ must have an argument of class or enumerated type