How to define operator == () in class?
class element { ... SomeType value; public: ... friend bool operator==(const element& left, const element& right); } ... bool operator==(const element& left, const element& right) { return left.value==right.value; }
Like that.
Source: https://ru.stackoverflow.com/questions/264170/More articles:Delete the last word in a line using "preg_replace ()"Question about filtering with modse mSearch2How to make a search for a specific combination of the bitmap?Animated actions in GmailMongoDB, Redis, MySQL- what to choose?How to parse part of the HTML string?Xcode hotkeysUse extensionsWork with authorized usersAnd again this tricky .htaccess and mod_rewriteAll Articles