I am currently working on creating an overloaded function for the == operator. I am creating an hpp file for a linked list, and I cannot get this statement to work in the hpp file.
I currently have this:
template <typename T_> class sq_list { bool operator == ( sq_list & lhs, sq_list & rhs) { return *lhs == *rhs; }; reference operator * () { return _c; }; }; }
I get about 10 errors, but they pretty much repeat as errors:
C2804: binary 'operator ==' has too many parameters
C2333: 'sq_list :: operator ==': error in function declaration; skipping body function
C2143: syntax error: missing ';' before '*'
C4430: missing type specifier - int. Note: C ++ does not support default-int
I tried to make a difference, but I constantly get the same errors as above
Any advice or help on this subject is welcome.
Johnston
source share